[klibc] [socket.h] add (more) missing definitions

Andrea Adami andrea.adami at gmail.com
Mon Aug 8 05:22:29 PDT 2011


to compile kexec-tools statically against klibc we still need a patch
for socket.h, otherwise:

| kexec/ifdown.c:46:16: error: 'SIOCGIFCONF' undeclared (first use in
this function)
| kexec/ifdown.c:46:16: note: each undeclared identifier is reported
only once for each function it appears in
| kexec/ifdown.c:65:18: error: 'SIOCSIFFLAGS' undeclared (first use in
this function)

In fact:

lib/klibc $ grep -R SIOCGIFCONF .
./include/linux/if.h: * Structure used in SIOCGIFCONF request.
./include/linux/sockios.h:#define SIOCGIFCONF   0x8912          /* get
iface list

lib/klibc $ grep -R SIOCSIFFLAGS .
./include/linux/sockios.h:#define SIOCSIFFLAGS  0x8914          /* set
flags    */

Now, the patch we are using in OpenEmbedded is

+#include <linux/socket.h>
+#include <linux/version.h>
+#include <linux/sockios.h>             /* the SIOCxxx I/O controls     */
+#include <linux/uio.h>

but it looks like you could as well add the SIOCGIFCONF and SIOCSIFFLAGS.



More information about the klibc mailing list