git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Patrick Welche <prlw1@cam.ac.uk>
Cc: git@vger.kernel.org
Subject: Re: compiling on netbsd
Date: Mon, 27 Apr 2009 09:59:31 -0700	[thread overview]
Message-ID: <7vocui3udo.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20090426134900.GB454@quartz.inf.phy.cam.ac.uk> (Patrick Welche's message of "Sun, 26 Apr 2009 14:49:00 +0100")

Patrick Welche <prlw1@cam.ac.uk> writes:

> I found I needed to add the following patch in order to compile today's
> git source under NetBSD-current (5.99.11)

Thanks; USE_ST_TIMESPEC part is a nice companion patch to 9140804
(Makefile: turn on USE_ST_TIMESPEC for FreeBSD, 2009-03-22).

I cannot tell if "#define _NETBSD_SOURCE 1" has a potential to regress
things to existing NetBSD users with releases different from yours, so I
need to ask some help here.

Any objection from people who runs older NetBSD?

-- >8 --
From: Patrick Welche <prlw1@cam.ac.uk>
Date: Sun, 26 Apr 2009 14:49:00 +0100
Subject: [PATCH] NetBSD compilation fix

Similar to other BSD variants, it needs USE_ST_TIMESPEC.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Makefile          |    1 +
 git-compat-util.h |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index f006d2c..bb15c6b 100644
--- a/Makefile
+++ b/Makefile
@@ -764,6 +764,7 @@ ifeq ($(uname_S),NetBSD)
 	BASIC_CFLAGS += -I/usr/pkg/include
 	BASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib
 	THREADED_DELTA_SEARCH = YesPlease
+	USE_ST_TIMESPEC = YesPlease
 endif
 ifeq ($(uname_S),AIX)
 	NO_STRCASESTR=YesPlease
diff --git a/git-compat-util.h b/git-compat-util.h
index 785aa31..1ac16bd 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -46,6 +46,7 @@
 #define _ALL_SOURCE 1
 #define _GNU_SOURCE 1
 #define _BSD_SOURCE 1
+#define _NETBSD_SOURCE 1
 
 #include <unistd.h>
 #include <stdio.h>
-- 
1.6.3.rc3

      reply	other threads:[~2009-04-27 16:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-26 13:49 compiling on netbsd Patrick Welche
2009-04-27 16:59 ` 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=7vocui3udo.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=prlw1@cam.ac.uk \
    /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).