aboutsummaryrefslogtreecommitdiffstats
path: root/main/f2fs-tools/0001-fibmap.f2fs-compile-fix-for-musl-libc.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/f2fs-tools/0001-fibmap.f2fs-compile-fix-for-musl-libc.patch')
-rw-r--r--main/f2fs-tools/0001-fibmap.f2fs-compile-fix-for-musl-libc.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/main/f2fs-tools/0001-fibmap.f2fs-compile-fix-for-musl-libc.patch b/main/f2fs-tools/0001-fibmap.f2fs-compile-fix-for-musl-libc.patch
new file mode 100644
index 0000000000..6999cd91d9
--- /dev/null
+++ b/main/f2fs-tools/0001-fibmap.f2fs-compile-fix-for-musl-libc.patch
@@ -0,0 +1,36 @@
+From 38be92a84bb368a9e70e3d7bfb58ffd8075af58b Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 3 Mar 2014 09:14:57 +0000
+Subject: [PATCH] fibmap.f2fs: compile fix for musl libc
+
+Include sys/types.h for major/minor macros.
+
+This fixes the following compile error with musl libc:
+fibmap.o: In function `print_stat':
+/home/ncopa/src/f2fs-tools/tools/fibmap.c:34: undefined reference to `minor'
+/home/ncopa/src/f2fs-tools/tools/fibmap.c:34: undefined reference to `major'
+fibmap.o: In function `stat_bdev':
+/home/ncopa/src/f2fs-tools/tools/fibmap.c:54: undefined reference to `minor'
+/home/ncopa/src/f2fs-tools/tools/fibmap.c:54: undefined reference to `major'
+collect2: error: ld returned 1 exit status
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ tools/fibmap.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tools/fibmap.c b/tools/fibmap.c
+index ed0a08e..a6a112b 100644
+--- a/tools/fibmap.c
++++ b/tools/fibmap.c
+@@ -5,6 +5,7 @@
+ #include <stdio.h>
+ #include <fcntl.h>
+ #include <errno.h>
++#include <sys/types.h>
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
+ #include <libgen.h>
+--
+1.9.0
+