Wed May 24 15:19:12 2017 UTC ()
Fix SunOS build with GCC 7 and newer.


(jperkin)
diff -r1.26 -r1.27 pkgsrc/print/ghostscript-gpl/Makefile

cvs diff -r1.26 -r1.27 pkgsrc/print/ghostscript-gpl/Makefile (expand / switch to context diff)
--- pkgsrc/print/ghostscript-gpl/Makefile 2017/05/19 13:29:04 1.26
+++ pkgsrc/print/ghostscript-gpl/Makefile 2017/05/24 15:19:12 1.27
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2017/05/19 13:29:04 prlw1 Exp $
+# $NetBSD: Makefile,v 1.27 2017/05/24 15:19:12 jperkin Exp $
 
 DISTNAME=	ghostscript-${GS_VERSION}
 PKGNAME=	${DISTNAME:S/ghostscript/ghostscript-gpl/}
@@ -73,6 +73,10 @@
 # used when making a shared object; recompile with -fPIC
 .if !empty(PKGSRC_COMPILER:Mgcc) || !empty(PKGSRC_COMPILER:Mclang)
 CFLAGS+=		-fPIC
+.endif
+
+.if ${OPSYS} == "SunOS" && !empty(CC_VERSION:Mgcc-[7-9]*)
+CPPFLAGS+=		-D_XOPEN_SOURCE=600 -D__EXTENSIONS__
 .endif
 
 # Interim IRIX build fix, the real problem is that fontconfig.pc doesn't