[Toybox] _GNU_SOURCE definition problem
Georgi Chorbadzhiyski
gf at unixsol.org
Fri Mar 9 18:30:37 PST 2012
On 3/10/12 4:25 AM, Georgi Chorbadzhiyski wrote:
> On 3/10/12 4:14 AM, Rob Landley wrote:
>>> glibc insists that this Linux only functionality is behind __USE_GNU
>>> which is declared in features.h if _GNU_SOURCE is declared [2].
>>
>> glibc 2.11.1 here does not, sounds like a recent regression.
>>
>> But sure, I can #include linux/sched.h to get this.
>
> Adding #include <linux/sched.h> gets me the flag definitions but
> unshare() is still only available "guarded" by _GNU_SOURCE. Damn.
>
> toys/unshare.c: In function ‘unshare_main’:
> toys/unshare.c:42:2: warning: implicit declaration of function ‘unshare’ [-Wimplicit-function-declaration]
> make: *** [toybox] Error 1
>
> gf at gf:~/git/toybox$ cd /usr/include
> gf at gf:/usr/include$ grep -rw unshare *
> bits/sched.h:extern int unshare (int __flags) __THROW;
And here is the patch that broke unshare since Sat, 28 May 2011 04:53:13
http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=ce67228d570d2df88d74184e5e3618a5b2ef8704
Looks like glibc >= 2.14 have this problem.
--
Georgi Chorbadzhiyski
http://georgi.unixsol.org/
1331346637.0
More information about the Toybox
mailing list