diff mbox series

[nfs-utils,2/2] support/junction/path.c: Fix buld for musl

Message ID 20240908114312.3883312-2-liezhi.yang@windriver.com (mailing list archive)
State New
Headers show
Series [nfs-utils,1/2] support/include/junction.h: Define macros for musl | expand

Commit Message

liezhi.yang@windriver.com Sept. 8, 2024, 11:43 a.m. UTC
From: Robert Yang <liezhi.yang@windriver.com>

Fixed:
path.c:164:24: error: implicit declaration of function 'strchrnul'; did you mean 'strchr'? [-Wimplicit-function-declaration]
[snip]

path.c:239:27: error: 'NAME_MAX' undeclared (first use in this function); did you mean 'AF_MAX'?

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 support/junction/path.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/support/junction/path.c b/support/junction/path.c
index 13a14386..dd0f59a0 100644
--- a/support/junction/path.c
+++ b/support/junction/path.c
@@ -23,6 +23,12 @@ 
  *	http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
  */
 
+/* For musl */
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include <limits.h>
+
 #include <sys/types.h>
 #include <sys/stat.h>