Skip to contentSkip to conversation

auth-pam.c: add missing include limits.h

PATCH In review Antonio Quartulli 2 participants 2 messages Apr 21, 2022 – Apr 22, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 auth-pam.c: add missing include limits.h

On most systems limits.h is pulled in by some other header and thus no error is ever triggered, but it's possible to find the right environment which lackis this and prevents compiling auth-pam.c (possibly when using LibreSSL).

Include the header explicitly as it includes the definition of PATH_MAX.

(note that this bug is fixed in Gentoo since 2020 by including a custom patch, but apparently the issue was never reported upstream)

---
 src/plugins/auth-pam/auth-pam.c | 1 +
 1 file changed, 1 insertion(+)
src/plugins/auth-pam/auth-pam.c +1 -0
index f893b51f..70339445 100644
@@ -47,6 +47,7 @@
 #include <fcntl.h>
 #include <signal.h>
 #include <syslog.h>
+#include <limits.h>
 #include "utils.h"
 
 #include <openvpn-plugin.h>
Signature · 1 line
2.35.1
Acked-by on v1 1/1
#1 lore raw

Sounds reasonable, and <limits.h> is standard. Test compiled on FreeBSD.

Your patch has been applied to the master and release/2.5 branch.

commit 0fed64a91d894b46105bf7e8b16edea4d90ab70c (master) commit 70b6c69c8255ebd6e789e59b0fe8e106a35e9ad8 (release/2.5)

Author: Antonio Quartulli
Date:   Thu Apr 21 15:19:09 2022 +0200
     auth-pam.c: add missing include limits.h

     Signed-off-by: Antonio Quartulli <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg24136.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering