diff mbox series

[2/3] file: fix missing include for PATH_MAX constant

Message ID b867217d30569b84e098ca013c44e07e1df598fb.1549290423.git.ps@pks.im (mailing list archive)
State New, archived
Headers show
Series [1/3] configure.ac: more carefully detect availability of res_querydomain(3) | expand

Commit Message

Patrick Steinhardt Feb. 4, 2019, 2:31 p.m. UTC
While making use of the PATH_MAX constant, "file.c" does not include the
"limits.h" header. While it is being transitively included via other
headers on most platforms, it is not on e.g. musl-based systems.

Add the include to fix compilation.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 support/misc/file.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Steve Dickson Feb. 27, 2019, 5:14 p.m. UTC | #1
On 2/4/19 9:31 AM, Patrick Steinhardt wrote:
> While making use of the PATH_MAX constant, "file.c" does not include the
> "limits.h" header. While it is being transitively included via other
> headers on most platforms, it is not on e.g. musl-based systems.
> 
> Add the include to fix compilation.
Committed...

steved. 
> 
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
>  support/misc/file.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/support/misc/file.c b/support/misc/file.c
> index 4065376..e7c3819 100644
> --- a/support/misc/file.c
> +++ b/support/misc/file.c
> @@ -27,6 +27,7 @@
>  #include <dirent.h>
>  #include <stdlib.h>
>  #include <stdbool.h>
> +#include <limits.h>
>  
>  #include "xlog.h"
>  #include "misc.h"
>
diff mbox series

Patch

diff --git a/support/misc/file.c b/support/misc/file.c
index 4065376..e7c3819 100644
--- a/support/misc/file.c
+++ b/support/misc/file.c
@@ -27,6 +27,7 @@ 
 #include <dirent.h>
 #include <stdlib.h>
 #include <stdbool.h>
+#include <limits.h>
 
 #include "xlog.h"
 #include "misc.h"