The code to detect the method to detect interfaces fails if the build host does not have any interfaces. This seems to be the normal situation on a Linux vserver (not even a loopback device). A patch has been submitted to the Debian bug tracking system that seems to solve this problem, but you may want to give it broader portability testing. --- --- source/lib/interfaces.c 2005-07-28 15:19:45.000000000 +0200 +++ interfaces.c.naive-fix 2006-08-20 23:58:41.000000000 +0200 @@ -397,7 +397,7 @@ int i; printf("got %d interfaces:\n", total); - if (total <= 0) exit(1); + if (total < 0) exit(1); for (i=0;i<total;i++) { printf("%-10s ", ifaces[i].name); --- This should work because a failure in the interface detection method comes back as -1, while 0 should be a valid result.
Probably fixed by 3fbd1ae54ced2eb889a8fe0a6ea32dfd8175f941 (2007) > r25472: Fix the interfaces code to detect IPv6 interfaces, using the > new standard getifaddrs() and freeifaddrs() interfaces. Currently > we only return IPv4 af_families. Needs fixing for binds to IPv6 > but this has to be but there's also be4decb2b73e3431155663c2dae3a8452ecde28a (2007), which I think is the Samba 4 version: > r26467: Use getifaddrs() for interface enumeration and provide > replacements for platforms that don't have it in lib/replace.