compat: fixes for header handling with OpenBSD / NetBSD
PATCH v2 1/1 compat: fixes for header handling with OpenBSD / NetBSD
Handle OpenBSD and NetBSD as FreeBSD / DragonFly are. OpenBSD would need _XOPEN_SOURCE to be set to 700. Its simpler to just not set _XOPEN_SOURCE.
CC strbuf.o
strbuf.c:645:6: warning: call to undeclared function 'getdelim'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
r = getdelim(&sb->buf, &sb->alloc, term, fp);
^1 warning generated.
--- compat/posix.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
compat/posix.h +5 -5
@@ -60,11 +60,11 @@# else # define _XOPEN_SOURCE 500# endif -#elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && \ - !defined(_M_UNIX) && !defined(__sgi) && !defined(__DragonFly__) && \ - !defined(__TANDEM) && !defined(__QNX__) && !defined(__MirBSD__) && \ - !defined(__CYGWIN__) -#define _XOPEN_SOURCE 600/* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */ +#elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && \ + !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__MirBSD__) && \ + !defined(__USLC__) && !defined(_M_UNIX) && !defined(__sgi) && \ + !defined(__TANDEM) && !defined(__QNX__) && !defined(__CYGWIN__) +#define _XOPEN_SOURCE 600/* glibc2 and AIX 5.3L need 500 */ #define _XOPEN_SOURCE_EXTENDED 1/* AIX 5.3L needs this */ #endif #define _ALL_SOURCE 1
Signature · 1 line
2.49.0
Quoted 6 lines · Brad Smith
Handle OpenBSD and NetBSD as FreeBSD / DragonFly are. OpenBSD would need
_XOPEN_SOURCEto be set to 700. Its simpler to just not set_XOPEN_SOURCE.CC strbuf.o
strbuf.c:645:6: warning: call to undeclared function 'getdelim'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
Quoted 8 lines
r = getdelim(&sb->buf, &sb->alloc, term, fp); ^1 warning generated.
Signed-off-by Brad Smith <[email protected]>--- compat/posix.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Thanks!
Collin