dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Tobias Frost <tobi@coldtobi.de>
To: Emil Velikov <emil.l.velikov@gmail.com>,
	ML dri-devel <dri-devel@lists.freedesktop.org>,
	Gary Wong <gtw@gnu.org>
Cc: Tobias Frost <tobi@coldtobi.de>
Subject: [PATCH] Workaround for systems that does not have PATH_MAX, like hurd.
Date: Sun, 24 Apr 2016 09:57:01 +0200	[thread overview]
Message-ID: <1461484621-15446-1-git-send-email-tobi@coldtobi.de> (raw)
In-Reply-To: <1461216633.14744.4.camel@frost.de>

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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-04-24  8:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-21  5:30 libdrm: Patch to compile on hurd Tobias Frost
2016-04-21 12:33 ` Emil Velikov
2016-04-24  8:00   ` Tobias Frost
2016-04-24  7:57 ` Tobias Frost [this message]
2016-04-24 20:03   ` [PATCH] Workaround for systems that does not have PATH_MAX, like hurd Emil Velikov
2016-04-24  8:09 ` libdrm: Patch to compile on hurd -- includes in drm.h Tobias Frost
2016-04-24  8:09   ` [PATCH] On hurd other includes are required to compile Tobias Frost
2016-04-24 20:20     ` Emil Velikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461484621-15446-1-git-send-email-tobi@coldtobi.de \
    --to=tobi@coldtobi.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=gtw@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).