Skip to content

Commit

Permalink
streamproxy: fix build with musl
Browse files Browse the repository at this point in the history
fix
 ../../git/src/webrequest.cpp:15:10: fatal error: sys/unistd.h: No such file

patch sent upstream

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
  • Loading branch information
andrea-adami committed Jun 17, 2021
1 parent 81bd682 commit 76b525c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From bb7800494d834f517c0d97768ef3cc1d2521d4eb Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Tue, 15 Jun 2021 01:41:13 +0200
Subject: [PATCH 1/1] streamproxy: fix build with musl

fix
| ../../git/src/webrequest.cpp:15:10: fatal error: sys/unistd.h:
No such file or directory
| 15 | #include <sys/unistd.h>

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
---
src/webrequest.cpp | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/src/webrequest.cpp b/src/webrequest.cpp
index ce20a45..02e0f24 100644
--- a/src/webrequest.cpp
+++ b/src/webrequest.cpp
@@ -12,7 +12,11 @@ using std::string;
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef __GLIBC__
#include <sys/unistd.h>
+#else
+#include <unistd.h>
+#endif
#include <string.h>

WebRequest::WebRequest(const ConfigMap &config_map_in, const HeaderMap &headers_in,
--
2.17.1

2 changes: 2 additions & 0 deletions meta-openpli/recipes-openpli/streamproxy/streamproxy.bb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ PKGV = "2+git${GITPKGV}"
RDEPENDS_${PN} = "enigma2-plugin-systemplugins-transcodingsetup"

SRC_URI = "git://github.com/eriksl/streamproxy.git;protocol=git"
SRC_URI_append_libc-musl = " file://0001-streamproxy-fix-build-with-musl.patch"

FILES_${PN} = "${bindir}/streamproxy ${sysconfdir}/init.d/streamproxy.sh ${sysconfdir}/enigma2/streamproxy.conf"
CONFFILES_${PN} = "${sysconfdir}/enigma2/streamproxy.conf"
S = "${WORKDIR}/git"
Expand Down

0 comments on commit 76b525c

Please sign in to comment.