2019-08-26 07:49:38

by Patrick Steinhardt

[permalink] [raw]
Subject: [PATCH 2/3] nfsdcld: add missing include for PATH_MAX

While glibc transitively includes <limits.h> and thus has PATH_MAX
available, other libc implementations may not have the transitive
include and thus miss the definition. Add an explicit include of
<limits.h> to fix compilation with musl libc.

Signed-off-by: Patrick Steinhardt <[email protected]>
---
utils/nfsdcld/legacy.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/utils/nfsdcld/legacy.c b/utils/nfsdcld/legacy.c
index f0ca3168..07f477ab 100644
--- a/utils/nfsdcld/legacy.c
+++ b/utils/nfsdcld/legacy.c
@@ -24,6 +24,7 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <limits.h>
#include "cld.h"
#include "sqlite.h"
#include "xlog.h"
--
2.23.0


2019-08-26 18:55:33

by Steve Dickson

[permalink] [raw]
Subject: Re: [PATCH 2/3] nfsdcld: add missing include for PATH_MAX



On 8/26/19 3:48 AM, Patrick Steinhardt wrote:
> While glibc transitively includes <limits.h> and thus has PATH_MAX
> available, other libc implementations may not have the transitive
> include and thus miss the definition. Add an explicit include of
> <limits.h> to fix compilation with musl libc.
>
> Signed-off-by: Patrick Steinhardt <[email protected]>
Committed...

steved.
> ---
> utils/nfsdcld/legacy.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/utils/nfsdcld/legacy.c b/utils/nfsdcld/legacy.c
> index f0ca3168..07f477ab 100644
> --- a/utils/nfsdcld/legacy.c
> +++ b/utils/nfsdcld/legacy.c
> @@ -24,6 +24,7 @@
> #include <errno.h>
> #include <sys/types.h>
> #include <sys/stat.h>
> +#include <limits.h>
> #include "cld.h"
> #include "sqlite.h"
> #include "xlog.h"
>