diff options
author | David Adam <zanchey@ucc.gu.uwa.edu.au> | 2014-12-08 11:48:28 +0800 |
---|---|---|
committer | David Adam <zanchey@ucc.gu.uwa.edu.au> | 2014-12-21 23:38:02 +0800 |
commit | 11bece80a83eafeb436eae87aa5d6e8c88e47691 (patch) | |
tree | b1fd8d27dcf2ab1dec5fa8e94750ac9f8c5ce1a2 /env_universal_common.cpp | |
parent | a10f729ef9f778f09d8e0995f43551b3990daae7 (diff) |
Solaris build fixes: fallback to _XOPEN_NAME_MAX if defined
Diffstat (limited to 'env_universal_common.cpp')
-rw-r--r-- | env_universal_common.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/env_universal_common.cpp b/env_universal_common.cpp index f9adb4ac..15c1524d 100644 --- a/env_universal_common.cpp +++ b/env_universal_common.cpp @@ -36,6 +36,13 @@ #include <notify.h> #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 */ |