aboutsummaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/nsss/nsss-switch.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/include/nsss/nsss-switch.h b/src/include/nsss/nsss-switch.h
index 1bfe50f..8ee428e 100644
--- a/src/include/nsss/nsss-switch.h
+++ b/src/include/nsss/nsss-switch.h
@@ -5,6 +5,7 @@
#include <sys/types.h>
#include <limits.h>
+#include <unistd.h>
#include <skalibs/tai.h>
#include <skalibs/buffer.h>
#include <skalibs/stralloc.h>
@@ -14,7 +15,12 @@
#include <nsss/shadow-switch.h>
#define NSSS_SWITCH_BUFSIZE 4096
+
+#ifdef LOGIN_NAME_MAX
#define NSSS_SWITCH_NAME_MAXLEN LOGIN_NAME_MAX
+#else
+#define NSSS_SWITCH_NAME_MAXLEN _SC_LOGIN_NAME_MAX
+#endif
typedef struct nsss_switch_s nsss_switch_t, *nsss_switch_t_ref ;
struct nsss_switch_s