]> git.armaanb.net Git - opendoas.git/blobdiff - pam.c
Fallback definition for HOST_NAME_MAX.
[opendoas.git] / pam.c
diff --git a/pam.c b/pam.c
index c5a3001509b59364281466cca310d56ce523b990..ccebd0fe98105499e81555bd5d15b3335cec3258 100644 (file)
--- a/pam.c
+++ b/pam.c
@@ -271,6 +271,9 @@ pamauth(const char *user, const char *myname, int interactive, int nopass, int p
                if (!interactive)
                        errx(1, "Authorization required");
 
+#ifndef HOST_NAME_MAX
+#define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
+#endif
                /* doas style prompt for pam */
                char host[HOST_NAME_MAX + 1];
                if (gethostname(host, sizeof(host)))