Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: namespace pollution? clone()



On Tue, Jul 26, 2022 at 13:27:43 +0300, Valery Ushakov wrote:

> On Tue, Jul 26, 2022 at 12:00:16 +0200, Thomas Klausner wrote:
> 
> > I wonder why it's visible though, since in sched.h it's protected by
> > _NETBSD_SOURCE.
> 
> Re-run that command with -E -dD and without -c and related options

Ok, so _NETBSD_SOURCE is the default unless ansi, posix or x/open was
explicitly requested.  sched.h declares both clone and __clone, where
the latter is the actual function and the former is a weak alias.

On Linux clone(2) is declared only for _GNU_SOURCE, which explains why
linux doesn't run into the name clash.  I gather we should follow
suit, as that's what the apps expect.

-uwe


Home | Main Index | Thread Index | Old Index