NetBSD compilation fix
authorPatrick Welche <prlw1@cam.ac.uk>
Sun, 26 Apr 2009 13:49:00 +0000 (14:49 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Apr 2009 16:54:24 +0000 (09:54 -0700)
Similar to other BSD variants, it needs USE_ST_TIMESPEC.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
git-compat-util.h

index f006d2ccadbe282805f134f4eb1711e218592aa7..bb15c6b929caf2f03b7a76a17c63ccf28c6d908e 100644 (file)
--- 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
index 785aa31b46c4781b5003aa60214b42d122310e31..1ac16bde5ab853098f857a64c6f0fea9f4c3437f 100644 (file)
@@ -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>