From acfce97879614daed03d2c1d6636cb227ab1ea67 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 16 Jun 2015 14:37:55 +0200 Subject: [PATCH] picocom: fix compilation with musl (#1383) Only use termio.h with glibc or uclibc, for musl include sys/ioctl.h and termios.h instead. Signed-off-by: Jo-Philipp Wich --- utils/picocom/Makefile | 4 ++-- utils/picocom/patches/100-musl-compat.patch | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 utils/picocom/patches/100-musl-compat.patch diff --git a/utils/picocom/Makefile b/utils/picocom/Makefile index b5251b412..31a1ad644 100644 --- a/utils/picocom/Makefile +++ b/utils/picocom/Makefile @@ -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 index 000000000..5f7d75034 --- /dev/null +++ b/utils/picocom/patches/100-musl-compat.patch @@ -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 + #include + #include +-#ifdef __linux__ ++#if defined(__linux__) && (defined(__GLIBC__) || defined(__UCLIBC__)) + #include + #else + #include ++#include + #endif /* of __linux__ */ + + #include "term.h"