summaryrefslogtreecommitdiff
path: root/tools/compat
diff options
context:
space:
mode:
authorpalle <palle@NetBSD.org>2023-07-08 19:10:00 +0000
committerpalle <palle@NetBSD.org>2023-07-08 19:10:00 +0000
commit08308a482718716e6a2b2021ec1a01465d36be96 (patch)
tree8e7256967ca6aaabbebcac597772a5fb9f81f37d /tools/compat
parentf7b5305bbc03725effdf436fcf4297a721275eff (diff)
Add support for missing NAME_MAX when building on Solaris hosts
Diffstat (limited to 'tools/compat')
-rw-r--r--tools/compat/compat_defs.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/compat/compat_defs.h b/tools/compat/compat_defs.h
index c7dda485361..3c10eda643e 100644
--- a/tools/compat/compat_defs.h
+++ b/tools/compat/compat_defs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_defs.h,v 1.120 2021/05/30 10:39:41 cjep Exp $ */
+/* $NetBSD: compat_defs.h,v 1.121 2023/07/08 19:10:00 palle Exp $ */
#ifndef __NETBSD_COMPAT_DEFS_H__
#define __NETBSD_COMPAT_DEFS_H__
@@ -31,6 +31,17 @@
#endif /* __linux__ && HAVE_FEATURES_H */
/*
+ * Solaris:
+ * No NAME_MAX define is available (as documented in the Solaris
+ * limits.h file), so use the XOPEN defined constant.
+ */
+
+#if defined(__sun__)
+#define NAME_MAX _XOPEN_NAME_MAX
+#endif
+
+
+/*
* Type substitutes.
* These are controlled via HAVE_TYPE protections and some of them are needed
* in other header files (in the build tree not in the host). This is because