Date: Sat, 23 Oct 2021 10:35:43 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 259374] [Linux Compatibility Layer] : getifaddrs() : errno = EAFNOSUPPORT Message-ID: <bug-259374-227-QzoVzteRrE@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-259374-227@https.bugs.freebsd.org/bugzilla/> References: <bug-259374-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D259374 --- 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 =3D %d\n", errno); int count =3D 0; /* Count the number of interfaces */ for (ent =3D addrs; ent; ent =3D ent->ifa_next)=20 { count++; /* ERRATUM */ printf("\"%s\" af_family =3D %d\n", ent->ifa_name, ent->ifa_addr->sa_fa= mily); } freeifaddrs(addrs); } --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-259374-227-QzoVzteRrE>