Merge pull request #1385 from dangowrt/fix-f2fs-tools-build-with-musl
authorLuka Perkov <luka.perkov@sartura.hr>
Tue, 16 Jun 2015 13:54:53 +0000 (15:54 +0200)
committerLuka Perkov <luka.perkov@sartura.hr>
Tue, 16 Jun 2015 13:54:53 +0000 (15:54 +0200)
f2fs-tools: fix build with musl

net/socat/Makefile
net/socat/patches/100-musl-compat.patch [new file with mode: 0644]
utils/picocom/Makefile
utils/picocom/patches/100-musl-compat.patch [new file with mode: 0644]

index 361a4d5cf8b2c6feb0144cb2529df34957175dbc..b89ffcad296f1a3c8807d5d6469334155619bb71 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-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:=socat
 PKG_VERSION:=1.7.3.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download
diff --git a/net/socat/patches/100-musl-compat.patch b/net/socat/patches/100-musl-compat.patch
new file mode 100644 (file)
index 0000000..ae5c8d0
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/sysincludes.h
++++ b/sysincludes.h
+@@ -79,6 +79,9 @@
+ #endif
+ #if HAVE_NETDB_H && (_WITH_IP4 || _WITH_IP6)
+ #include <netdb.h>    /* struct hostent, gethostbyname() */
++#if !(__UCLIBC__ || __GLIBC__)
++#define NETDB_INTERNAL -1
++#endif
+ #endif
+ #if HAVE_SYS_UN_H && WITH_UNIX
+ #include <sys/un.h>   /* struct sockaddr_un, unix domain sockets */
+@@ -139,8 +142,10 @@
+ #include <netpacket/packet.h>
+ #endif
+ #if HAVE_NETINET_IF_ETHER_H
++#if defined(__UCLIBC__) || defined(__GLIBC__)
+ #include <netinet/if_ether.h>
+ #endif
++#endif
+ #if HAVE_LINUX_IF_TUN_H
+ #include <linux/if_tun.h>
+ #endif
index b5251b41239fed35ca27171fd9ce97f4398d38b1..31a1ad644bdca3066a4daf4a5aeeb1cf25fe1080 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-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:=picocom
 PKG_VERSION:=1.7
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://picocom.googlecode.com/files
diff --git a/utils/picocom/patches/100-musl-compat.patch b/utils/picocom/patches/100-musl-compat.patch
new file mode 100644 (file)
index 0000000..5f7d750
--- /dev/null
@@ -0,0 +1,17 @@
+Index: picocom-1.7/term.c
+===================================================================
+--- picocom-1.7.orig/term.c
++++ picocom-1.7/term.c
+@@ -33,10 +33,11 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <unistd.h>
+-#ifdef __linux__
++#if defined(__linux__) && (defined(__GLIBC__) || defined(__UCLIBC__))
+ #include <termio.h>
+ #else
+ #include <termios.h>
++#include <sys/ioctl.h>
+ #endif /* of __linux__ */
+ #include "term.h"