standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming
Konstantin Belousov
kostikbel at gmail.com
Sat Apr 5 20:16:17 UTC 2014
On Tue, Apr 01, 2014 at 03:31:31PM +0000, Christian Neukirchen wrote:
> >Fix:
> Adjust the condition in /usr/include/sys/fcntl.h to use _POSIX_C_SOURCE >= 200809
>
> #if __BSD_VISIBLE
> #define O_NOFOLLOW 0x0100 /* don't follow symlinks */
> #endif
>
Thank you for noting this. Still, I want to formally request your
confirmation that the following patch works for you. I only have 1003.1,
2013 access right now.
diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h
index 3461f8b..2691449 100644
--- a/sys/sys/fcntl.h
+++ b/sys/sys/fcntl.h
@@ -96,7 +96,7 @@ typedef __pid_t pid_t;
#define O_FSYNC 0x0080 /* synchronous writes */
#endif
#define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */
-#if __BSD_VISIBLE
+#if __POSIX_VISIBLE >= 200809
#define O_NOFOLLOW 0x0100 /* don't follow symlinks */
#endif
#define O_CREAT 0x0200 /* create if nonexistent */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-standards/attachments/20140405/a512a50c/attachment.sig>
More information about the freebsd-standards
mailing list