diff options
author | Pino Toscano <toscano.pino@tiscali.it> | 2023-05-08 08:55:42 +0200 |
---|---|---|
committer | Pino Toscano <toscano.pino@tiscali.it> | 2023-05-11 07:16:06 +0200 |
commit | cbe0839c89116e9c33f35b3fe185c63493ec34b2 (patch) | |
tree | 575091cbfc184cf1a12233b4d896e679924e05d0 /modules/pam_timestamp/pam_timestamp.c | |
parent | 4aec21a15e0611d717b3c45fcf36e6356e96c46c (diff) | |
download | pam-cbe0839c89116e9c33f35b3fe185c63493ec34b2.tar.gz pam-cbe0839c89116e9c33f35b3fe185c63493ec34b2.tar.bz2 pam-cbe0839c89116e9c33f35b3fe185c63493ec34b2.zip |
pam_timestamp: do not assume PATH_MAX is defined
PATH_MAX is optional in POSIX, and not defined on GNU/Hurd; hence,
in case it is not defined, define BUFLEN directly to LINE_MAX.
Diffstat (limited to 'modules/pam_timestamp/pam_timestamp.c')
-rw-r--r-- | modules/pam_timestamp/pam_timestamp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/pam_timestamp/pam_timestamp.c b/modules/pam_timestamp/pam_timestamp.c index c5fa6dfc..4bb556e4 100644 --- a/modules/pam_timestamp/pam_timestamp.c +++ b/modules/pam_timestamp/pam_timestamp.c @@ -82,7 +82,9 @@ /* Various buffers we use need to be at least as large as either PATH_MAX or * LINE_MAX, so choose the larger of the two. */ -#if (LINE_MAX > PATH_MAX) +#ifndef PATH_MAX +#define BUFLEN LINE_MAX +#elif (LINE_MAX > PATH_MAX) #define BUFLEN LINE_MAX #else #define BUFLEN PATH_MAX |