O_NOFOLLOW is not a gnu extension, it's posix-2008.
Rich Felker
dalias at aerifal.cx
Thu Mar 14 05:07:43 UTC 2013
On Fri, Mar 08, 2013 at 09:57:37PM -0600, Rob Landley wrote:
> Files like libc/sysdeps/linux/powerpc/bits/fcntl.h have blobs like:
>
> #ifdef __USE_GNU
> # define O_DIRECT 0400000 /* Direct disk access. */
> # define O_DIRECTORY 040000 /* Must be a directory. */
> # define O_NOFOLLOW 0100000 /* Do not follow links. */
> # define O_NOATIME 01000000 /* Do not set atime. */
> # define O_CLOEXEC 02000000 /* Set close_on_exec. */
> #endif
>
> Meaning that if you don't #define GNU_DAMMIT you don't get symbols
> Posix-2008 has been requiring for several years now:
>
> file:///home/landley/reading/SUSv4/basedefs/fcntl.h.html
>
> Which is why you don't need the #define to use O_NOFOLLOW in glibc.
>
> This is hard to work around because the value of the symbol varies
> per-target.
I think the cleanest fix would be for uClibc to just define them
unconditionally. O_* is in the reserved namespace for fcntl.h so
there's no requirement in POSIX that extended O_* flags be hidden by
default.
Rich
More information about the uClibc
mailing list