From: Junio C Hamano <gitster@pobox.com>
To: Collin Funk <collin.funk1@gmail.com>
Cc: Brad Smith <brad@comstyle.com>, git@vger.kernel.org
Subject: Re: [PATCH] compat: fixes for header handling with OpenBSD / NetBSD
Date: Tue, 03 Jun 2025 07:37:52 -0700 [thread overview]
Message-ID: <xmqqwm9sriv3.fsf@gitster.g> (raw)
In-Reply-To: <87y0u9qxk8.fsf@gmail.com> (Collin Funk's message of "Mon, 02 Jun 2025 21:05:43 -0700")
Collin Funk <collin.funk1@gmail.com> writes:
> Brad Smith <brad@comstyle.com> writes:
> ...
>> But as said, it is harmless. I can leave it in if desired.
> ...
> I would prefer just leaving it for any old system that may need it.
OK, here is what I will queue.
-------- >8 --------
From: Brad Smith <brad@comstyle.com>
Date: Mon, 2 Jun 2025 03:29:02 -0400
Subject: [PATCH] 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.
Signed-off-by: Brad Smith <brad@comstyle.com>
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
compat/posix.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/compat/posix.h b/compat/posix.h
index f4c71f9427..067a00f33b 100644
--- a/compat/posix.h
+++ b/compat/posix.h
@@ -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
--
2.50.0-rc0-176-g427db30fd9
prev parent reply other threads:[~2025-06-03 14:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-02 7:29 [PATCH] compat: fixes for header handling with OpenBSD / NetBSD Brad Smith
2025-06-02 18:06 ` Collin Funk
2025-06-03 0:36 ` Junio C Hamano
2025-06-03 3:56 ` Brad Smith
2025-06-03 4:05 ` Collin Funk
2025-06-03 14:37 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqwm9sriv3.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=brad@comstyle.com \
--cc=collin.funk1@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).