aboutsummaryrefslogtreecommitdiff
path: root/net/tgt/patches/100-musl-compat.patch
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-06-18 20:16:34 +0200
committerJo-Philipp Wich <jow@openwrt.org>2015-06-18 20:18:15 +0200
commite55822ec2b5f6b94c85113de1608fd75830b849c (patch)
tree58f72e54a7e851fca78910c4599b7cd208e82ef2 /net/tgt/patches/100-musl-compat.patch
parent4116e327afee80aaea33a16358f5f7c0da687bec (diff)
tgt: fix musl compatibility
- Include `sys/user.h` if `__WORDSIZE` is undefined - Add `fcntl.h` to `libscc.c` in order to declare `loff_t` Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'net/tgt/patches/100-musl-compat.patch')
-rw-r--r--net/tgt/patches/100-musl-compat.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/net/tgt/patches/100-musl-compat.patch b/net/tgt/patches/100-musl-compat.patch
new file mode 100644
index 000000000..4d84955b4
--- /dev/null
+++ b/net/tgt/patches/100-musl-compat.patch
@@ -0,0 +1,36 @@
+--- a/usr/tgtd.h
++++ b/usr/tgtd.h
+@@ -9,6 +9,10 @@
+ #include <systemd/sd-daemon.h>
+ #endif
+
++#ifndef __WORDSIZE
++#include <sys/user.h>
++#endif
++
+ struct concat_buf;
+
+ #define NR_SCSI_OPCODES 256
+--- a/usr/util.h
++++ b/usr/util.h
+@@ -16,6 +16,10 @@
+ #include <limits.h>
+ #include <linux/types.h>
+
++#ifndef __WORDSIZE
++#include <sys/user.h>
++#endif
++
+ #include "be_byteshift.h"
+
+ #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
+--- a/usr/libssc.c
++++ b/usr/libssc.c
+@@ -23,6 +23,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <stdio.h>
++#include <fcntl.h>
+ #include "bs_ssc.h"
+ #include "ssc.h"
+ #include "be_byteshift.h"