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

maximilian attems maks at vostochny.stro.at
Mon Aug 8 11:27:25 PDT 2011

On Tue, Aug 09, 2011 at 02:49:21AM +0900, KUMAAN wrote:
> >
> > | 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)

ack, could easily reproduce.
> SIOCGIFCONF and SIOCSIFFLAGS are arguments for ioctl().
> Including 'sys/ioctl.h' of Embedded GNU C Library define them,
> but including 'sys/socket.h' of it do not define them.
> Of course, 'kexec-tools/kexec/ifdown.c' includes <sys/ioctl.h> also.
> This is why 'sys/ioctl.h' of klibc may have to be changed
> if klibc wants more compatibility with (Embedded) GNU C Library.
> For example, as you wrote, it may have to include 'linux/sockios.h'.

see sent patch, not really happy, but well this is a mess.
with it, i still get tons of other gcc warning/errors:

kexec/ifdown.c: In function ‘ifdown’:
kexec/ifdown.c:40:2: warning: implicit declaration of function ‘if_nameindex’ [-Wimplicit-function-declaration]
kexec/ifdown.c:40:11: warning: assignment makes pointer from integer without a cast [enabled by default]
kexec/ifdown.c:47:22: error: dereferencing pointer to incomplete type
kexec/ifdown.c:47:37: error: increment of pointer to unknown structure
kexec/ifdown.c:47:3: error: arithmetic on pointer to an incomplete type
kexec/ifdown.c:49:20: error: dereferencing pointer to incomplete type

guess you have other stuff in openembedded lying around?

thank you.


More information about the klibc mailing list