From e55822ec2b5f6b94c85113de1608fd75830b849c Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 18 Jun 2015 20:16:34 +0200 Subject: [PATCH] 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 --- net/tgt/Makefile | 4 +-- net/tgt/patches/100-musl-compat.patch | 36 +++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 net/tgt/patches/100-musl-compat.patch diff --git a/net/tgt/Makefile b/net/tgt/Makefile index 874a9309c..77e518005 100644 --- a/net/tgt/Makefile +++ b/net/tgt/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2012-2014 OpenWrt.org +# Copyright (C) 2012-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tgt PKG_VERSION:=1.0.53 PKG_REV:=9764e0afd9a7115e356fc85569a780f9003c4eac -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_USE_MIPS16:=0 PKG_SOURCE_PROTO:=git 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 + #endif + ++#ifndef __WORDSIZE ++#include ++#endif ++ + struct concat_buf; + + #define NR_SCSI_OPCODES 256 +--- a/usr/util.h ++++ b/usr/util.h +@@ -16,6 +16,10 @@ + #include + #include + ++#ifndef __WORDSIZE ++#include ++#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 + #include + #include ++#include + #include "bs_ssc.h" + #include "ssc.h" + #include "be_byteshift.h"