From: Junio C Hamano <gitster@pobox.com>
To: Jakub Kulik <jakub.kulik@oracle.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] version: accept positive uname(2) return values
Date: Wed, 18 Nov 2026 09:11:14 -0800 [thread overview]
Message-ID: <xmqqjyma6p59.fsf@gitster.g> (raw)
In-Reply-To: <20261118160146.60429-2-jakub.kulik@oracle.com> (Jakub Kulik's message of "Wed, 18 Nov 2026 17:01:47 +0100")
Jakub Kulik <jakub.kulik@oracle.com> writes:
> POSIX specifies that uname(2) can return any non-negative value on
> success. Update the get_uname_info() check to follow this.
>
> Signed-off-by: Jakub Kulik <jakub.kulik@oracle.com>
> ---
> Thank you. Hope this is how it should look.
Perfect. Thanks.
>
> version.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/version.c b/version.c
> index 21ec7c0fbe..ca3be6d610 100644
> --- a/version.c
> +++ b/version.c
> @@ -83,7 +83,7 @@ int get_uname_info(struct strbuf *buf, unsigned int full)
> {
> struct utsname uname_info;
>
> - if (uname(&uname_info)) {
> + if (uname(&uname_info) < 0) {
> strbuf_addf(buf, _("uname() failed with error '%s' (%d)\n"),
> strerror(errno),
> errno);
prev parent reply other threads:[~2026-11-18 17:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 15:52 uname check fails on Solaris due to different return value Jakub Kulik
2026-11-12 19:29 ` Junio C Hamano
2026-11-18 16:01 ` [PATCH] version: accept positive uname(2) return values Jakub Kulik
2026-11-18 17:11 ` 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=xmqqjyma6p59.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jakub.kulik@oracle.com \
/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