* [PATCH] fix Hurd PATH_MAX ...
@ 2020-09-30 23:38 Luc Van Oostenryck
0 siblings, 0 replies; only message in thread
From: Luc Van Oostenryck @ 2020-09-30 23:38 UTC (permalink / raw)
To: linux-sparse; +Cc: Luc Van Oostenryck
The fix quickly added for Hurd not defining PATH_MAX is not correct:
the local define must be guaranteed to be done only after <limits.h>
is included, which is not.
Since this problem only exists with Hurd, simply conditionalize
the local define by __gnu_hurd__. Horrible but well ... Hurd.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
lib.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib.h b/lib.h
index b35debc83288..0b1d4492e6bd 100644
--- a/lib.h
+++ b/lib.h
@@ -44,7 +44,7 @@
#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
#endif
-#ifndef PATH_MAX
+#ifdef __gnu_hurd__
#define PATH_MAX 4096 // Hurd doesn't define this
#endif
--
2.28.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-30 23:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-30 23:38 [PATCH] fix Hurd PATH_MAX Luc Van Oostenryck
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).