OSDN Git Service

Allow the FreeBSD users not to include the newer get_nic_info function
authorwifiextender <router@archlinux.info>
Sun, 21 Aug 2016 08:06:39 +0000 (10:06 +0200)
committerwifiextender <router@archlinux.info>
Sun, 21 Aug 2016 08:06:39 +0000 (10:06 +0200)
src/net.c

index 1fdd918..36de174 100644 (file)
--- a/src/net.c
+++ b/src/net.c
@@ -426,6 +426,8 @@ error:
 */
 void
 get_nic_info(char *str1, char *str2) {
+#if WITH_NET == 1
+
   struct rt_msghdr *rtm = NULL;
   struct sockaddr *sa = NULL, *addrs[RTAX_MAX];
   char *buf = NULL, *next = NULL, *lim = NULL;
@@ -484,5 +486,9 @@ error:
     free(buf);
   }
   return;
+
+#else
+  RECOMPILE_WITH("net");
+#endif /* WITH_NET */
 }
 #endif /* __FreeBSD__ */