summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorpho <pho@pkgsrc.org>2014-06-12 04:15:48 +0000
committerpho <pho@pkgsrc.org>2014-06-12 04:15:48 +0000
commit766ed697aadbd9aec17594b7ced237ab11c9bc86 (patch)
treec542f570f544b01ee22735841cd84779c415674c /devel
parent5f920858dfeb147d47dbb61adefc20591b8acf0d (diff)
downloadpkgsrc-766ed697aadbd9aec17594b7ced237ab11c9bc86.tar.gz
Fix compilation issues on glibc-based platforms
Diffstat (limited to 'devel')
-rw-r--r--devel/tig/Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/devel/tig/Makefile b/devel/tig/Makefile
index 7d2d94fc494..c996031399c 100644
--- a/devel/tig/Makefile
+++ b/devel/tig/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2014/04/04 21:00:24 ryoon Exp $
+# $NetBSD: Makefile,v 1.12 2014/06/12 04:15:48 pho Exp $
DISTNAME= tig-1.2.1
CATEGORIES= devel scm
@@ -26,6 +26,16 @@ CONFIGURE_ENV+= GIT_CONFIG=${GIT_CONFIG:Q}
CONFIGURE_ARGS+= ${CONFIGURE_ARGS.${ICONV_TYPE}-iconv}
CONFIGURE_ARGS.gnu-iconv= --with-libiconv=${BUILDLINK_PREFIX.iconv}
+.include "../../mk/bsd.prefs.mk"
+.if !empty(GLIBC_VERSION)
+# Some version of glibc requires _XOPEN_SOURCE being defined to
+# provide S_IFMT in <sys/stat.h>
+CFLAGS+= -D_XOPEN_SOURCE
+# It is also required to define _BSD_SOURCE to get struct timezone
+# defined in <sys/time.h>
+CFLAGS+= -D_BSD_SOURCE
+.endif
+
BUILD_TARGET= all doc
INSTALL_TARGET= install install-doc