Commit Diff


commit - 50a8f9107c1e3cf94a2c9e548d55cd5349e5434f
commit + fad3441ba9cd67fb34b6a5e28b3161c075c0b14f
blob - 1e179aeede1e962fe30c8fc3b09538b6a033655b
blob + c0d10271c63c76e9dced4a8fd13afd7268055ce0
--- configure
+++ configure
@@ -319,6 +319,7 @@ echo "#include <sys/types.h>"
 echo "#include <sys/uio.h>"
 echo "#include <stdint.h>"
 echo "#include <imsg.h>"
+echo "#include <limits.h>"
 
 cat <<__HEREDOC__
 
@@ -422,6 +423,17 @@ cat <<__HEREDOC__
 
 #ifndef __dead
 #define __dead __attribute__((noreturn))
+#endif
+
+/* Linux and OpenBSD have LOGIN_NAME_MAX, FreeBSD MAXLOGNAME. */
+#ifndef LOGIN_NAME_MAX
+# if defined(MAXLOGNAME)
+#  define LOGIN_NAME_MAX MAXLOGNAME
+# elif defined(_POSIX_LOGIN_NAME_MAX)
+#  define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX
+# else
+#  define LOGIN_NAME_MAX 32
+# endif
 #endif
 __HEREDOC__