Gnulib makes use of O_NOFOLLOW in a couple of places. On NetBSD, this definition (and some others) are only enabled under _NETBSD_SOURCE. See http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/fcntl.h?rev=1.48&content-type=text/x-cvsweb-markup
How about this patch? 2017-08-14 Bruno Haible <[email protected]> extensions: Enable NetBSD specific extensions. * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _NETBSD_SOURCE. diff --git a/m4/extensions.m4 b/m4/extensions.m4 index 0c16bb8..2acbe2e 100644 --- a/m4/extensions.m4 +++ b/m4/extensions.m4 @@ -1,4 +1,4 @@ -# serial 16 -*- Autoconf -*- +# serial 17 -*- Autoconf -*- # Enable extensions on systems that normally disable them. # Copyright (C) 2003, 2006-2017 Free Software Foundation, Inc. @@ -68,6 +68,10 @@ dnl configure.ac when using autoheader 2.62. #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif +/* Enable NetBSD extensions on NetBSD. */ +#ifndef _NETBSD_SOURCE +# undef _NETBSD_SOURCE +#endif /* Enable OpenBSD extensions on NetBSD. */ #ifndef _OPENBSD_SOURCE # undef _OPENBSD_SOURCE
