This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Werror in <sys/socket.h>
- From: Richard Henderson <rth at twiddle dot net>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 11 Dec 2014 13:56:11 -0800
- Subject: Werror in <sys/socket.h>
- Authentication-results: sourceware.org; auth=none
Miraculously, alphaev67 builds with gcc 4.9.2 without Werror.
Perusing make check, however, I see
> In file included from ../inet/netinet/in.h:23:0,
> from ../include/netinet/in.h:3,
> from ../resolv/resolv.h:57,
> from ../include/resolv.h:12,
> from ../nptl/descr.h:39,
> from ../sysdeps/alpha/nptl/tls.h:48,
> from ../sysdeps/unix/sysv/linux/alpha/sysdep.h:30,
> from ../sysdeps/unix/sysv/linux/lowlevellock-futex.h:22,
> from ../sysdeps/nptl/lowlevellock.h:23,
> from ../sysdeps/nptl/bits/stdio-lock.h:23,
> from ../libio/libio.h:149,
> from ../libio/stdio.h:74,
> from scanf15.c:10:
> ../include/sys/socket.h:95:24: error: âstruct mmsghdrâ declared inside parameter
> list [-Werror]
> unsigned int __vlen, int __flags);
> ^
> ../include/sys/socket.h:95:24: error: its scope is only this definition or decla
> ration, which is probably not what you want [-Werror]
> cc1: all warnings being treated as errors
> make[2]: *** [/home/rth/work/libc/bld/stdio-common/scanf15.o] Error 1
I'm not sure what the proper resolution for this should be.
Normally we have __USE_GNU defined, and so pick up the definition of mmsghdr
from <socket/sys/socket.h>. But this test explicitly uses _XOPEN_SOURCE, so we
don't have that.
Should <include/sys/socket.h> mirror <socket/sys/socket.h> in suppressing the
definition of __sendmmsg if __USE_GNU is not defined? Or should we just add a
forward declaration of the structure on the preceding line?
r~