This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
conflict wrt. sigcontext definitions and use
- From: David Miller <davem at davemloft dot net>
- To: libc-alpha at sourceware dot org
- Date: Mon, 12 Jan 2015 13:37:56 -0500 (EST)
- Subject: conflict wrt. sigcontext definitions and use
- Authentication-results: sourceware.org; auth=none
include/signal.h unconditionally references "struct sigcontext" via
the argument to __sigreturn().
It gets the structure definition via it's signal/signal.h include.
However, down in that include chain, sigcontext will only end up being
defined if __USE_MISC is defined.
For me on sparc this results in the build of stdio-common/scanf15.c
failing with:
In file included from ../misc/sys/param.h:28:0,
from ../include/sys/param.h:1,
from ../sysdeps/unix/sysv/linux/sparc/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/signal.h:44:32: error: ʽstruct sigcontextʼ declared inside parameter list [-Werror]
../include/signal.h:44:32: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
cc1: all warnings being treated as errors
Any suggestions? Is protecting the __sigreturn() declaration with
__USE_MISC the right thing to do?