changeset 1581:f625328e6859 draft

Compile on Mac OSX 10.4. Thanks to David Brownlee.
author Roy Marples <roy@marples.name>
date Mon, 06 Dec 2010 15:01:56 +0000
parents 6eb6a8e98c21
children 491ccb10ff72
files if-bsd.c platform-bsd.c
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/if-bsd.c	Fri Nov 19 10:17:14 2010 +0000
+++ b/if-bsd.c	Mon Dec 06 15:01:56 2010 +0000
@@ -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 @@
 		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 @@
 					break;
 				}
 				break;
+#endif
 			case RTM_IFINFO:
 				ifm = (struct if_msghdr *)(void *)p;
 				memset(ifname, 0, sizeof(ifname));
--- a/platform-bsd.c	Fri Nov 19 10:17:14 2010 +0000
+++ b/platform-bsd.c	Mon Dec 06 15:01:56 2010 +0000
@@ -31,6 +31,10 @@
 
 #include "platform.h"
 
+#ifndef SYS_NMLN	/* OSX */
+#  define SYS_NMLN 256
+#endif
+
 static char march[SYS_NMLN];
 
 char *