Message ID | 15b474e6fa7aee12e64e4376f7716a232e40100a.1566805721.git.ps@pks.im (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/3] mount: fix compilation if __GLIBC__ is not defined | expand |
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 <ps@pks.im> 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" >
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"
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 <ps@pks.im> --- utils/nfsdcld/legacy.c | 1 + 1 file changed, 1 insertion(+)