From cbe0839c89116e9c33f35b3fe185c63493ec34b2 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 8 May 2023 08:55:42 +0200 Subject: 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. --- modules/pam_timestamp/pam_timestamp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/pam_timestamp/pam_timestamp.c') 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 -- cgit v1.2.3