[pacman-dev] [PATCH] Add the missing limits.h include to hook.c
Currently, pacman will not build against musl libc (and presumably some other libc implementations?) because PATH_MAX is undefined in hook.c. Fix that by including <limits.h>.
PATH_MAX is only defined in limits.h in musl libc, so ensure that it is included. Presumably this is also required on other platforms. Signed-off-by: Alastair Hughes <hobbitalastair@gmail.com> --- lib/libalpm/hook.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libalpm/hook.c b/lib/libalpm/hook.c index ed79fdd..00d999b 100644 --- a/lib/libalpm/hook.c +++ b/lib/libalpm/hook.c @@ -20,6 +20,7 @@ #include <ctype.h> #include <dirent.h> #include <errno.h> +#include <limits.h> #include <string.h> #include "handle.h" -- 2.7.0
On 04/02/16 04:25, Alastair Hughes wrote:
PATH_MAX is only defined in limits.h in musl libc, so ensure that it is included. Presumably this is also required on other platforms.
Signed-off-by: Alastair Hughes <hobbitalastair@gmail.com>
Thanks, Allan
participants (2)
-
Alastair Hughes
-
Allan McRae