This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: getifaddrs
- From: Roland McGrath <roland at redhat dot com>
- To: Momchil Velikov <velco at fadata dot bg>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Mon, 25 Nov 2002 18:48:28 -0800
- Subject: Re: getifaddrs
Those changes would break GNU/Linux, where there is no sa_len field. I
think it is harmless to allocate and copy a bit too much, so I just changed
ifaddrs.c to use struct sockaddr_storage and left the structure assignments
(so now they will copy more than needed, but always enough) rather than
complicating the code with conditional use of sa_len.
I've put in the changes to set the fields to null instead of failing when
the ioctls other that SIOCGIFFLAGS fail.