aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/musl/patches/600-nftw-support-common-gnu-extension.patch
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain/musl/patches/600-nftw-support-common-gnu-extension.patch')
-rw-r--r--toolchain/musl/patches/600-nftw-support-common-gnu-extension.patch12
1 files changed, 6 insertions, 6 deletions
diff --git a/toolchain/musl/patches/600-nftw-support-common-gnu-extension.patch b/toolchain/musl/patches/600-nftw-support-common-gnu-extension.patch
index 81c96ad76c..2a7436cf84 100644
--- a/toolchain/musl/patches/600-nftw-support-common-gnu-extension.patch
+++ b/toolchain/musl/patches/600-nftw-support-common-gnu-extension.patch
@@ -32,9 +32,9 @@ Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com>
+#define _GNU_SOURCE
#include <ftw.h>
#include <dirent.h>
- #include <sys/stat.h>
-@@ -63,8 +64,20 @@ static int do_nftw(char *path, int (*fn)
- lev.base = k;
+ #include <fcntl.h>
+@@ -72,8 +73,20 @@ static int do_nftw(char *path, int (*fn)
+ if (!fd_limit) close(dfd);
}
- if (!(flags & FTW_DEPTH) && (r=fn(path, &st, type, &lev)))
@@ -56,7 +56,7 @@ Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com>
for (; h; h = h->chain)
if (h->dev == st.st_dev && h->ino == st.st_ino)
-@@ -88,7 +101,10 @@ static int do_nftw(char *path, int (*fn)
+@@ -101,7 +114,10 @@ static int do_nftw(char *path, int (*fn)
strcpy(path+j+1, de->d_name);
if ((r=do_nftw(path, fn, fd_limit-1, flags, &new))) {
closedir(d);
@@ -68,7 +68,7 @@ Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com>
}
}
closedir(d);
-@@ -98,8 +114,16 @@ static int do_nftw(char *path, int (*fn)
+@@ -112,8 +128,16 @@ static int do_nftw(char *path, int (*fn)
}
path[l] = 0;
@@ -87,7 +87,7 @@ Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com>
return 0;
}
-@@ -125,4 +149,5 @@ int nftw(const char *path, int (*fn)(con
+@@ -139,4 +163,5 @@ int nftw(const char *path, int (*fn)(con
return r;
}