{"thread":{"id":"19079","subject":"compiling on netbsd","startedAt":"2009-04-26T13:49:00Z","lastAt":"2009-04-27T16:59:31Z","messageCount":2,"participants":["Patrick Welche","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"112386","messageId":"20090426134900.GB454@quartz.inf.phy.cam.ac.uk","threadId":"19079","inReplyTo":null,"subject":"compiling on netbsd","fromName":"Patrick Welche","fromEmail":"prlw1@cam.ac.uk","sentAt":"2009-04-26T13:49:00Z","receivedAt":"2009-04-26T13:49:00Z","isPatch":false,"sender":{"key":"prlw1@cam.ac.uk","avatar":null},"body":"I found I needed to add the following patch in order to compile today's\ngit source under NetBSD-current (5.99.11)\n\nCheers,\n\nPatrick\n\n\ndiff --git a/Makefile b/Makefile\nindex 5c8e83a..25d2b9c 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -764,6 +764,7 @@ ifeq ($(uname_S),NetBSD)\n \tBASIC_CFLAGS += -I/usr/pkg/include\n \tBASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib\n \tTHREADED_DELTA_SEARCH = YesPlease\n+\tUSE_ST_TIMESPEC = YesPlease\n endif\n ifeq ($(uname_S),AIX)\n \tNO_STRCASESTR=YesPlease\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 785aa31..1ac16bd 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -46,6 +46,7 @@\n #define _ALL_SOURCE 1\n #define _GNU_SOURCE 1\n #define _BSD_SOURCE 1\n+#define _NETBSD_SOURCE 1\n \n #include <unistd.h>\n #include <stdio.h>\n"},{"id":"112439","messageId":"7vocui3udo.fsf@gitster.siamese.dyndns.org","threadId":"19079","inReplyTo":"20090426134900.GB454@quartz.inf.phy.cam.ac.uk","subject":"Re: compiling on netbsd","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-04-27T16:59:31Z","receivedAt":"2009-04-27T16:59:31Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Welche <prlw1@cam.ac.uk> writes:\n\n> I found I needed to add the following patch in order to compile today's\n> git source under NetBSD-current (5.99.11)\n\nThanks; USE_ST_TIMESPEC part is a nice companion patch to 9140804\n(Makefile: turn on USE_ST_TIMESPEC for FreeBSD, 2009-03-22).\n\nI cannot tell if \"#define _NETBSD_SOURCE 1\" has a potential to regress\nthings to existing NetBSD users with releases different from yours, so I\nneed to ask some help here.\n\nAny objection from people who runs older NetBSD?\n\n-- >8 --\nFrom: Patrick Welche <prlw1@cam.ac.uk>\nDate: Sun, 26 Apr 2009 14:49:00 +0100\nSubject: [PATCH] NetBSD compilation fix\n\nSimilar to other BSD variants, it needs USE_ST_TIMESPEC.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Makefile          |    1 +\n git-compat-util.h |    1 +\n 2 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex f006d2c..bb15c6b 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -764,6 +764,7 @@ ifeq ($(uname_S),NetBSD)\n \tBASIC_CFLAGS += -I/usr/pkg/include\n \tBASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib\n \tTHREADED_DELTA_SEARCH = YesPlease\n+\tUSE_ST_TIMESPEC = YesPlease\n endif\n ifeq ($(uname_S),AIX)\n \tNO_STRCASESTR=YesPlease\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 785aa31..1ac16bd 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -46,6 +46,7 @@\n #define _ALL_SOURCE 1\n #define _GNU_SOURCE 1\n #define _BSD_SOURCE 1\n+#define _NETBSD_SOURCE 1\n \n #include <unistd.h>\n #include <stdio.h>\n-- \n1.6.3.rc3\n"}]}