Re: compiling on netbsd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick Welche <prlw1@xxxxxxxxx> 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@xxxxxxxxx>
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@xxxxxxxxx>
---
 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


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]