summaryrefslogtreecommitdiffstats
path: root/main/f2fs-tools/0001-fibmap.f2fs-compile-fix-for-musl-libc.patch
blob: 6999cd91d947d628673c60d3faa7df01241c2e03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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