[Bug 259374] [Linux Compatibility Layer] : getifaddrs() : errno = EAFNOSUPPORT
Date: Sat, 23 Oct 2021 10:35:43 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259374 --- Comment #1 from Didier Garcin <didu31@hotmail.fr> --- #include <errno.h> #include <stdio.h> #include <ifaddrs.h> #include <sys/socket.h> int main(int argc, char** argv) { struct ifaddrs *addrs, *ent; if (getifaddrs(&addrs)) printf("errno = %d\n", errno); int count = 0; /* Count the number of interfaces */ for (ent = addrs; ent; ent = ent->ifa_next) { count++; /* ERRATUM */ printf("\"%s\" af_family = %d\n", ent->ifa_name, ent->ifa_addr->sa_family); } freeifaddrs(addrs); } -- You are receiving this mail because: You are the assignee for the bug.