summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPino Toscano <toscano.pino@tiscali.it>2023-05-08 08:47:10 +0200
committerPino Toscano <toscano.pino@tiscali.it>2023-05-11 07:12:49 +0200
commit76acc70921450fdbf4d8ca01145bfb0bbb783fd6 (patch)
treebb08eccdaa251771e2668b2183a66746c0c2789f /tests
parentbf07335a19d6192adaf4b1a817d2101ee0bad134 (diff)
downloadlinux-pam-git-76acc70921450fdbf4d8ca01145bfb0bbb783fd6.tar.gz
tests: define PATH_MAX if not available
PATH_MAX is optional in POSIX, and not defined on GNU/Hurd; since these sources are tests, it is fine to hardcoded a fallback value that allows the tests to build and run.
Diffstat (limited to 'tests')
-rw-r--r--tests/tst-dlopen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/tst-dlopen.c b/tests/tst-dlopen.c
index 70927163..00e14543 100644
--- a/tests/tst-dlopen.c
+++ b/tests/tst-dlopen.c
@@ -16,6 +16,10 @@
#include <limits.h>
#include <sys/stat.h>
+#ifndef PATH_MAX
+# define PATH_MAX 4096
+#endif
+
/* Simple program to see if dlopen() would succeed. */
int main(int argc, char **argv)
{