* compiling on netbsd
@ 2009-04-26 13:49 Patrick Welche
2009-04-27 16:59 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Patrick Welche @ 2009-04-26 13:49 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 132 bytes --]
I found I needed to add the following patch in order to compile today's
git source under NetBSD-current (5.99.11)
Cheers,
Patrick
[-- Attachment #2: git.patch --]
[-- Type: text/plain, Size: 645 bytes --]
diff --git a/Makefile b/Makefile
index 5c8e83a..25d2b9c 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>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: compiling on netbsd
2009-04-26 13:49 compiling on netbsd Patrick Welche
@ 2009-04-27 16:59 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2009-04-27 16:59 UTC (permalink / raw)
To: Patrick Welche; +Cc: git
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-27 16:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-26 13:49 compiling on netbsd Patrick Welche
2009-04-27 16:59 ` Junio C Hamano
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).