From 11bece80a83eafeb436eae87aa5d6e8c88e47691 Mon Sep 17 00:00:00 2001 From: David Adam Date: Mon, 8 Dec 2014 11:48:28 +0800 Subject: [PATCH] Solaris build fixes: fallback to _XOPEN_NAME_MAX if defined --- env_universal_common.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/env_universal_common.cpp b/env_universal_common.cpp index f9adb4acd..15c1524d8 100644 --- a/env_universal_common.cpp +++ b/env_universal_common.cpp @@ -36,6 +36,13 @@ #include #endif +// NAME_MAX is not defined on Solaris and suggests the use of pathconf() +// There is no obvious sensible pathconf() for shared memory and _XPG_NAME_MAX +// seems a reasonable choice. +#if !defined(NAME_MAX) && defined(_XOPEN_NAME_MAX) +#define NAME_MAX _XOPEN_NAME_MAX +#endif + /** The set command */