Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 259507 - sys-apps/sandbox-1.3.{7,git} fail on gentoo-freebsd due to missing sighandler_t type.
Summary: sys-apps/sandbox-1.3.{7,git} fail on gentoo-freebsd due to missing sighandler...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-18 17:51 UTC by Javier Villavicencio (RETIRED)
Modified: 2009-02-18 21:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sighandler_t.patch (sighandler_t.patch,672 bytes, patch)
2009-02-18 20:21 UTC, Javier Villavicencio (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Javier Villavicencio (RETIRED) gentoo-dev 2009-02-18 17:51:30 UTC
i686-gentoo-freebsd7.1-gcc -DHAVE_CONFIG_H -I. -I../../sandbox-9999/src -I.. -I../../sandbox-9999 -I../../sandbox-9999/libsbutil -I../../sandbox-9999/libsbutil/include -DETCDIR="\"/etc\"" -DLIBSANDBOX_PATH="\"/usr/lib\"" -DSANDBOX_BASHRC_PATH="\"/usr/share/sandbox\"" -DPIC -fPIC -D_REENTRANT  -O2 -march=k8 -pipe -Wall -fdata-sections -ffunction-sections -MT sandbox.o -MD -MP -MF .deps/sandbox.Tpo -c -o sandbox.o ../../sandbox-9999/src/sandbox.c
../../sandbox-9999/src/sandbox.c: In function 'main':
../../sandbox-9999/src/sandbox.c:320: error: 'sighandler_t' undeclared (first use in this function)
../../sandbox-9999/src/sandbox.c:320: error: (Each undeclared identifier is reported only once
../../sandbox-9999/src/sandbox.c:320: error: for each function it appears in.)
../../sandbox-9999/src/sandbox.c:320: error: expected ';' before '_old'
../../sandbox-9999/src/sandbox.c:320: error: '_old' undeclared (first use in this function)
../../sandbox-9999/src/sandbox.c:321: error: expected ';' before '_old'
../../sandbox-9999/src/sandbox.c:322: error: expected ';' before '_old'

FreeBSD lacks the `typedef __sighandler_t sighandler_t;' declaration on signal.h.
Sidenote, I'm compiling git trying to stay ahead of the release, but I had to extract some autoconf macros from the tarball (AX_CHECK ones), are these added later or whut?.
Comment 1 SpanKY gentoo-dev 2009-02-18 20:02:11 UTC
the AX macros come from the autoconf-archive package
Comment 2 Javier Villavicencio (RETIRED) gentoo-dev 2009-02-18 20:21:12 UTC
Created attachment 182467 [details, diff]
sighandler_t.patch

Thanks, found that out a little later.
There is:
[...]
#if __BSD_VISIBLE
typedef __sighandler_t *sig_t; /* type of pointer to a signal function */
typedef void __siginfohandler_t(int, struct __siginfo *, void *);
#endif
[...]
in <sys/signal.h> on FreeBSD (included from <signal.h>), and also
[...]
#ifdef __USE_GNU
typedef __sighandler_t sighandler_t;
#endif

/* 4.4 BSD uses the name `sig_t' for this.  */
#ifdef __USE_BSD
typedef __sighandler_t sig_t;
#endif
[...]
in <signal.h> on glibc.

The patch works on linux and fbsd.