app-misc/screen: fix compilation error on Solaris
authorFabian Groffen <grobian@gentoo.org>
Fri, 20 Jan 2017 11:54:19 +0000 (12:54 +0100)
committerFabian Groffen <grobian@gentoo.org>
Fri, 20 Jan 2017 11:54:33 +0000 (12:54 +0100)
Package-Manager: portage-2.3.0

app-misc/screen/files/screen-4.5.0-solaris-PATH_MAX.patch [new file with mode: 0644]
app-misc/screen/screen-4.5.0.ebuild

diff --git a/app-misc/screen/files/screen-4.5.0-solaris-PATH_MAX.patch b/app-misc/screen/files/screen-4.5.0-solaris-PATH_MAX.patch
new file mode 100644 (file)
index 0000000..1fafcf9
--- /dev/null
@@ -0,0 +1,12 @@
+On Solaris one needs to include limits.h in order to use PATH_MAX
+
+--- screen-4.5.0/screen.c
++++ screen-4.5.0/screen.c
+@@ -44,6 +44,7 @@
+ #endif
+ #include <ctype.h>
+ #include <fcntl.h>
++#include <limits.h>
+ #ifdef sgi
+ # include <sys/sysmacros.h>
index e494a069d2e034946244eecf8a28ae8e25451e0e..7ea62d184fb9babfb76c997d4014ce720ab13d55 100644 (file)
@@ -36,6 +36,8 @@ DEPEND="${CDEPEND}
 PATCHES=(
        # Don't use utempter even if it is found on the system.
        "${FILESDIR}"/${PN}-4.3.0-no-utempter.patch
+       # PATH_MAX usage needs an include on Solaris
+       "${FILESDIR}"/${P}-solaris-PATH_MAX.patch
 )
 
 pkg_setup() {