[strace:code] Merge request: Wrap sa_restorer variables with #ifdef SA_RESTORER
Dmitry V. Levin
ldv at altlinux.org
Thu Sep 11 19:37:16 UTC 2014
On Thu, Sep 11, 2014 at 07:13:19PM +0000, Vicente Olivert Riera wrote:
> Merge request: Wrap sa_restorer variables with #ifdef SA_RESTORER
>
> ---
>
> Vicente Olivert Riera has requested that you merge changes from git://git.code.sf.net/u/vriera/strace (dece41de0a005a322a1b8b78226abb8c1ed3a4dc) into the branch master
>
> Since we define a SA_RESTORER symbol if our toolchain has sa_restorer support, then we can use it to wrap the declaration and access to the sa_restorer variables. This will fix compilation failures like this one:
If you can state that you have SA_RESTORER macro defined if and only if
your sigaction structures in kernel have sa_restorer member, then you are
lucky, because some architectures like ia64 and hppa seem to have no
sa_restorer in their kernel structures but still define SA_RESTORER. We
workaround this inconsistency with explicit #undef SA_RESTORER on these
architectures.
Minor corrections:
- sa_restorer is a structure member, not a variable;
- SA_RESTORER is a macro, not a symbol;
- "definition and use" rather than "declaration and access".
> http://autobuild.buildroot.org/results/04d/04de887fd501e1a1b9f811dacdf17596256097e6/build-end.log
Is this URL is going to remain valid forever? Anyway, let's quote the
relevant part of this build log instead:
signal.c: In function 'decode_old_sigaction':
signal.c:631:21: error: 'struct old_sigaction' has no member named 'sa_restorer'
signal.c: In function 'decode_new_sigaction':
signal.c:1224:21: error: 'struct new_sigaction' has no member named 'sa_restorer'
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20140911/45b42c0e/attachment.bin>
More information about the Strace-devel
mailing list