{"thread":{"id":"63568","subject":"[PATCH v2] compat: fixes for header handling with OpenBSD / NetBSD","startedAt":"2025-06-03T04:12:56Z","lastAt":"2025-06-03T04:39:38Z","messageCount":2,"participants":["Brad Smith","Collin Funk"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"519531","messageId":"aD52RXZVAsXpimBG@humpty.home.comstyle.com","threadId":"63568","inReplyTo":null,"subject":"[PATCH v2] compat: fixes for header handling with OpenBSD / NetBSD","fromName":"Brad Smith","fromEmail":"brad@comstyle.com","sentAt":"2025-06-03T04:12:53Z","receivedAt":"2025-06-03T04:12:56Z","isPatch":true,"sender":{"key":"brad@comstyle.com","avatar":"https://avatars.githubusercontent.com/u/1129902?v=4"},"body":"Handle OpenBSD and NetBSD as FreeBSD / DragonFly are. OpenBSD would\nneed _XOPEN_SOURCE to be set to 700. Its simpler to just not set\n_XOPEN_SOURCE.\n\n    CC strbuf.o\nstrbuf.c:645:6: warning: call to undeclared function 'getdelim'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\n        r = getdelim(&sb->buf, &sb->alloc, term, fp);\n            ^\n1 warning generated.\n\nSigned-off-by: Brad Smith <brad@comstyle.com>\n---\n compat/posix.h | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/compat/posix.h b/compat/posix.h\nindex f4c71f9427..067a00f33b 100644\n--- a/compat/posix.h\n+++ b/compat/posix.h\n@@ -60,11 +60,11 @@\n # else\n # define _XOPEN_SOURCE 500\n # endif\n-#elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && \\\n-      !defined(_M_UNIX) && !defined(__sgi) && !defined(__DragonFly__) && \\\n-      !defined(__TANDEM) && !defined(__QNX__) && !defined(__MirBSD__) && \\\n-      !defined(__CYGWIN__)\n-#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */\n+#elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && \\\n+      !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__MirBSD__) && \\\n+      !defined(__USLC__) && !defined(_M_UNIX) && !defined(__sgi) && \\\n+      !defined(__TANDEM) && !defined(__QNX__) && !defined(__CYGWIN__)\n+#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500 */\n #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */\n #endif\n #define _ALL_SOURCE 1\n-- \n2.49.0\n\n"},{"id":"519532","messageId":"87sekhqvzr.fsf@gmail.com","threadId":"63568","inReplyTo":"aD52RXZVAsXpimBG@humpty.home.comstyle.com","subject":"Re: [PATCH v2] compat: fixes for header handling with OpenBSD / NetBSD","fromName":"Collin Funk","fromEmail":"collin.funk1@gmail.com","sentAt":"2025-06-03T04:39:36Z","receivedAt":"2025-06-03T04:39:38Z","isPatch":true,"sender":{"key":"collin.funk1@gmail.com","avatar":"https://avatars.githubusercontent.com/u/65689063?v=4"},"body":"Brad Smith <brad@comstyle.com> writes:\n\n> Handle OpenBSD and NetBSD as FreeBSD / DragonFly are. OpenBSD would\n> need _XOPEN_SOURCE to be set to 700. Its simpler to just not set\n> _XOPEN_SOURCE.\n>\n>     CC strbuf.o\n> strbuf.c:645:6: warning: call to undeclared function 'getdelim'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\n>         r = getdelim(&sb->buf, &sb->alloc, term, fp);\n>             ^\n> 1 warning generated.\n>\n> Signed-off-by: Brad Smith <brad@comstyle.com>\n> ---\n>  compat/posix.h | 10 +++++-----\n>  1 file changed, 5 insertions(+), 5 deletions(-)\n\nThanks!\n\nReviewed-by: Collin Funk <collin.funk1@gmail.com>\n\nCollin\n"}]}