]> granicus.if.org Git - sudo/commitdiff
Older BSDi releases lack freeifaddrs() so add a test for that and if
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 18 Jan 2002 19:17:07 +0000 (19:17 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 18 Jan 2002 19:17:07 +0000 (19:17 +0000)
it is not present just use free().

config.h.in
interfaces.c

index cb873359bb04206b0ed4b66c46c86e3edb67f12b..281fc132b5e496cdaa501b258aa85d6c13cd1e4c 100644 (file)
@@ -79,6 +79,9 @@
 /* Define if you have the `fnmatch' function. */
 #undef HAVE_FNMATCH
 
+/* Define if you have the `freeifaddrs' function. */
+#undef HAVE_FREEIFADDRS
+
 /* Define if you have the `fstat' function. */
 #undef HAVE_FSTAT
 
index 34f07770be6c228250c5bf0d2229518ae17b5ea0..8d06d2e46d5aac7f3a05276e20ae735178ef825b 100644 (file)
@@ -157,7 +157,11 @@ load_interfaces()
                break;
        }
     }
+#ifdef HAVE_FREEIFADDRS
     freeifaddrs(ifaddrs);
+#else
+    free(ifaddrs);
+#endif
 }
 
 #elif defined(SIOCGIFCONF) && !defined(STUB_LOAD_INTERFACES)