summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-07-28 12:04:27 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-07-28 12:04:27 +0000
commit336830b651dfb661cdb5586d79aa8e7a2f8556fb (patch)
tree855ec6832d011bbdba9404c4fd2b4c6beacfd600 /src/include
parent32935ef03767814ef54c4c1905e00e320261c67c (diff)
downloadnsss-336830b651dfb661cdb5586d79aa8e7a2f8556fb.tar.xz
Fix build failures on which systems? THE BSDS OF COURSE
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