standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming
Konstantin Belousov
kostikbel at gmail.com
Sat Apr 5 20:20:01 UTC 2014
The following reply was made to PR standards/188173; it has been noted by GNATS.
From: Konstantin Belousov <kostikbel at gmail.com>
To: Christian Neukirchen <chneukirchen at gmail.com>
Cc: freebsd-gnats-submit at FreeBSD.org, standards at freebsd.org
Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming
Date: Sat, 5 Apr 2014 23:16:07 +0300
--cLlE6j+44ygFdGhU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
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 >=
=3D 200809
>=20
> #if __BSD_VISIBLE
> #define O_NOFOLLOW 0x0100 /* don't follow symlinks */
> #endif
>=20
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 >=3D 200809
#define O_NOFOLLOW 0x0100 /* don't follow symlinks */
#endif
#define O_CREAT 0x0200 /* create if nonexistent */
--cLlE6j+44ygFdGhU
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)
iQIcBAEBAgAGBQJTQGSGAAoJEJDCuSvBvK1BxxUQAJf9dfRzfibeNurPwjV5roDy
6btTsW+hgaAYwhOFnTDaRLcwdW0Z+R3zFZKB0T6j+VtAe2y4ekOWZYwRwoIkgLsq
WzD2LFIgPT+lccZxNI+G45GHKAYREP8tte1fH6iQwoUYjw6qw1kU6pCvFmRatsUf
zTO3bdqsBd8AD1m/8heHfcWnI1y+jh8o8m1vgIz9XToYczm8l9kEgcXZNS9n7fU5
wJ6vzJcPPpT+/DdpLWld6CFqM+ERE7KLOMN+WJOigGWeMTMACpvseGfiGngB1AsC
wIVxYoftZBixVC3dfmt0mDFC1ljcY6JwSk7eYnqH1Z1o8YeaxKxE9V3ZiyKjBmxL
wAb7H+l019or0FqqBL4a+l+Lye1rkmFbcGFl6wuionb+WCafsBQHLcnZVEB4Dgrt
iEdanWEKYRRoHBzNjU7/s/s6DRp3Co5aCvsT3BPZtZnlpkRSbtcTYIaQ3QKh+i9s
5K/fqUhfLJmK/J+WCmZyeT8uforuxAj89eMUicDGU34a3klxIPKJel5sQGLYcwaW
pQ2OdOlVHmhhLLt/P7k360xisytFuONakf5P6JCz5etQNi2zCuWf5g1gov/ZXFN7
UFVPAriUUGXYKs8BRxQjKCYsH0XjbDGvwv4KPBO/tNpIUcZMoj6VTdAd4OKn8fQs
sR7ZcTDjeWX/eHCp6iDn
=zV9O
-----END PGP SIGNATURE-----
--cLlE6j+44ygFdGhU--
More information about the freebsd-standards
mailing list