[PATCH] Workaround for systems that does not have PATH_MAX, like hurd.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It is safe to define it here, as the code is only using it for string
manipulation and not for syscalls that might make different assumptions.
---
 xf86drm.c | 7 +++++++
 xf86drm.h | 4 ++++
 2 files changed, 11 insertions(+)

diff --git a/xf86drm.c b/xf86drm.c
index 45aa5fc..4dac7a4 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -103,6 +103,13 @@
 
 #define memclear(s) memset(&s, 0, sizeof(s))
 
+/* for systems like hurd, which does not have PATH_MAX.
+ Usage is only for string manipulation, so it is save to define it.
+ 1kB will be plenty space.*/
+#ifndef PATH_MAX
+#define PATH_MAX (1024)
+#endif
+
 static drmServerInfoPtr drm_server_info;
 
 void drmSetServerInfo(drmServerInfoPtr info)
diff --git a/xf86drm.h b/xf86drm.h
index 481d882..1d45f02 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -58,7 +58,11 @@ extern "C" {
 
 #else /* One of the *BSDs */
 
+#if defined(__GNU__)
+#include <mach/i386/ioccom.h>
+#else
 #include <sys/ioccom.h>
+#endif
 #define DRM_IOCTL_NR(n)         ((n) & 0xff)
 #define DRM_IOC_VOID            IOC_VOID
 #define DRM_IOC_READ            IOC_OUT
-- 
2.8.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux