build: commit all the waf build files in the tree
[nivanova/samba-autobuild/.git] / source4 / lib / socket / netif.c
index bf410af4417e3f47cfdbcaf0a0607c504f6038ee..e36f268bde1edb70be65effa2c7ac0a8c02673c9 100644 (file)
@@ -34,6 +34,7 @@
 #include "includes.h"
 #include "system/network.h"
 #include "netif.h"
+#include "lib/util/tsort.h"
 
 /****************************************************************************
  Try the "standard" getifaddrs/freeifaddrs interfaces.
@@ -109,7 +110,7 @@ int get_interfaces(struct iface_struct *ifaces, int max_interfaces)
        if (total <= 0) return total;
 
        /* now we need to remove duplicates */
-       qsort(ifaces, total, sizeof(ifaces[0]), QSORT_CAST iface_comp);
+       TYPESAFE_QSORT(ifaces, total, iface_comp);
 
        for (i=1;i<total;) {
                if (iface_comp(&ifaces[i-1], &ifaces[i]) == 0) {