]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Compile on Mac OSX 10.4.
authorRoy Marples <roy@marples.name>
Mon, 6 Dec 2010 15:01:56 +0000 (15:01 +0000)
committerRoy Marples <roy@marples.name>
Mon, 6 Dec 2010 15:01:56 +0000 (15:01 +0000)
Thanks to David Brownlee.

if-bsd.c
platform-bsd.c

index b1b555ff1d1a50bb4cfd9eb53f3f036e60d7ea65..462ec2a0a09166a0414b0d23c422306de7f5b980 100644 (file)
--- a/if-bsd.c
+++ b/if-bsd.c
@@ -39,6 +39,8 @@
 #include <netinet/in.h>
 #ifdef __DragonFly__
 #  include <netproto/802_11/ieee80211_ioctl.h>
+#elif __APPLE__
+  /* FIXME: Add apple includes so we can work out SSID */
 #else
 #  include <net80211/ieee80211_ioctl.h>
 #endif
@@ -342,6 +344,7 @@ manage_link(int fd)
                for (p = link_buf; p < e; p += rtm->rtm_msglen) {
                        rtm = (struct rt_msghdr *)(void *)p;
                        switch(rtm->rtm_type) {
+#ifdef RTM_IFANNOUNCE
                        case RTM_IFANNOUNCE:
                                ifan = (struct if_announcemsghdr *)(void *)p;
                                switch(ifan->ifan_what) {
@@ -353,6 +356,7 @@ manage_link(int fd)
                                        break;
                                }
                                break;
+#endif
                        case RTM_IFINFO:
                                ifm = (struct if_msghdr *)(void *)p;
                                memset(ifname, 0, sizeof(ifname));
index f17ecabb5ee2b8935d233a0c12c083a19e0134ea..dd5791ca8df34e4768f7df61c69e8e72b0fc680f 100644 (file)
 
 #include "platform.h"
 
+#ifndef SYS_NMLN       /* OSX */
+#  define SYS_NMLN 256
+#endif
+
 static char march[SYS_NMLN];
 
 char *