[PATCH:xauth] include limits.h for PATH_MAX on OS'es without sys/syslimits.h

Alan Coopersmith alan.coopersmith at oracle.com
Fri Jan 2 09:50:36 PST 2015


Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 configure.ac |    2 +-
 gethost.c    |    4 ++++
 parsedpy.c   |    4 ++++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 2d36ed5..5a3f190 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,7 +41,7 @@ m4_ifndef([XORG_MACROS_VERSION],
 XORG_MACROS_VERSION(1.8)
 XORG_DEFAULT_OPTIONS
 
-AC_CHECK_HEADERS([net/errno.h])
+AC_CHECK_HEADERS([net/errno.h sys/syslimits.h])
 
 AC_CHECK_FUNCS([strlcpy])
 
diff --git a/gethost.c b/gethost.c
index c75ae02..e8e332a 100644
--- a/gethost.c
+++ b/gethost.c
@@ -58,7 +58,11 @@ in this Software without prior written authorization from The Open Group.
 #include "xauth.h"
 
 #include <sys/stat.h>
+#ifdef HAVE_SYS_SYSLIMITS_H
 #include <sys/syslimits.h>
+#else
+#include <limits.h>
+#endif
 
 #ifndef WIN32
 #include <arpa/inet.h>
diff --git a/parsedpy.c b/parsedpy.c
index 7365224..f43d78d 100644
--- a/parsedpy.c
+++ b/parsedpy.c
@@ -43,7 +43,11 @@ in this Software without prior written authorization from The Open Group.
 #include <X11/Xmu/SysUtil.h>
 
 #include <sys/stat.h>
+#ifdef HAVE_SYS_SYSLIMITS_H
 #include <sys/syslimits.h>
+#else
+#include <limits.h>
+#endif
 
 #if defined(UNIXCONN) || defined(LOCALCONN)
 #define UNIX_CONNECTION "unix"
-- 
1.7.9.2



More information about the xorg-devel mailing list