mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
package/tvheadend: bump version
Removed patch 0002, applied upstream:068e5f921d
Added patch to fix musl & uclibc build. Renamed option dvbcsa to tvhcsa. Upstream removed the dvbcsa configure option with this commit:4e7f837c70 (diff-e2d5a00791bce9a01f99bc6fd613a39d)
and moved the optional dvbcsa support inside the tvhcsa option block:c76c7e0604/configure (L645)
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
b236b4edaf
commit
23e18c4036
@ -0,0 +1,97 @@
|
|||||||
|
From 1f879e4b930fef71f030e5b6e5fae359f27d1aec Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||||
|
Date: Sat, 23 Jun 2018 20:47:26 +0200
|
||||||
|
Subject: [PATCH] configure: check for strlcat & strlcpy
|
||||||
|
|
||||||
|
Building tvheadend with uclibc and musl fails:
|
||||||
|
|
||||||
|
src/tvh_string.h:50:22: error: static declaration of 'strlcpy' follows non-static declaration
|
||||||
|
static inline size_t strlcpy(char *dst, const char *src, size_t size)
|
||||||
|
|
||||||
|
src/tvh_string.h:61:22: error: static declaration of 'strlcat' follows non-static declaration
|
||||||
|
static inline size_t strlcat(char *dst, const char *src, size_t count)
|
||||||
|
|
||||||
|
because they provide strlcat & strlcpy:
|
||||||
|
https://sourceware.org/glibc/wiki/strlcpy
|
||||||
|
|
||||||
|
This patch adds configure checks and makes the implementation in
|
||||||
|
tvh_string.h optional, the configure log looks like this:
|
||||||
|
|
||||||
|
glibc
|
||||||
|
checking for cc strlcat ... fail
|
||||||
|
checking for cc strlcpy ... fail
|
||||||
|
|
||||||
|
musl
|
||||||
|
checking for cc strlcat ... ok
|
||||||
|
checking for cc strlcpy ... ok
|
||||||
|
|
||||||
|
uclibc
|
||||||
|
checking for cc strlcat ... ok
|
||||||
|
checking for cc strlcpy ... ok
|
||||||
|
|
||||||
|
Patch sent upstream: https://github.com/tvheadend/tvheadend/pull/1133
|
||||||
|
|
||||||
|
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||||
|
---
|
||||||
|
configure | 14 ++++++++++++++
|
||||||
|
src/tvh_string.h | 4 ++++
|
||||||
|
2 files changed, 18 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/configure b/configure
|
||||||
|
index 0857a1958..b183d02b3 100755
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -159,6 +159,20 @@ else
|
||||||
|
COMPILER=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
+check_cc_snippet strlcat '#include <string.h>
|
||||||
|
+int test(int argc, char **argv) {
|
||||||
|
+ char dst[10];
|
||||||
|
+ strlcat("test", dst, sizeof(dst));
|
||||||
|
+ return 0;
|
||||||
|
+}'
|
||||||
|
+
|
||||||
|
+check_cc_snippet strlcpy '#include <string.h>
|
||||||
|
+int test(int argc, char **argv) {
|
||||||
|
+ char dst[10];
|
||||||
|
+ strlcpy("test", dst, sizeof(dst));
|
||||||
|
+ return 0;
|
||||||
|
+}'
|
||||||
|
+
|
||||||
|
check_cc_snippet getloadavg '#include <stdlib.h>
|
||||||
|
void test() { getloadavg(NULL,0); }'
|
||||||
|
|
||||||
|
diff --git a/src/tvh_string.h b/src/tvh_string.h
|
||||||
|
index 87d8c3320..13ef2f308 100644
|
||||||
|
--- a/src/tvh_string.h
|
||||||
|
+++ b/src/tvh_string.h
|
||||||
|
@@ -47,6 +47,7 @@ static inline const char *tvh_strbegins(const char *s1, const char *s2)
|
||||||
|
return s1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifndef ENABLE_STRLCPY
|
||||||
|
static inline size_t strlcpy(char *dst, const char *src, size_t size)
|
||||||
|
{
|
||||||
|
size_t ret = strlen(src);
|
||||||
|
@@ -57,7 +58,9 @@ static inline size_t strlcpy(char *dst, const char *src, size_t size)
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
+#ifndef ENABLE_STRLCAT
|
||||||
|
static inline size_t strlcat(char *dst, const char *src, size_t count)
|
||||||
|
{
|
||||||
|
size_t dlen = strlen(dst);
|
||||||
|
@@ -72,6 +75,7 @@ static inline size_t strlcat(char *dst, const char *src, size_t count)
|
||||||
|
dst[len] = '\0';
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#define tvh_strlcatf(buf, size, ptr, fmt...) \
|
||||||
|
do { int __r = snprintf((buf) + ptr, (size) - ptr, fmt); \
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
From b16ad4d258409fbd6acf843d62a7a84f621e3b70 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Bernd Kuhls <bernd.kuhls@t-online.de>
|
|
||||||
Date: Mon, 18 Dec 2017 20:52:06 +0100
|
|
||||||
Subject: [PATCH] sbuf: fix uclibc compilation error
|
|
||||||
|
|
||||||
Fixes build error
|
|
||||||
|
|
||||||
tvheadend-e06ffd87beff16103c47d6fa542df2374fca6fd3/src/sbuf.h:77:1:
|
|
||||||
error: unknown type name 'ssize_t'; did you mean 'size_t'?
|
|
||||||
ssize_t sbuf_read(sbuf_t *sb, int fd);
|
|
||||||
|
|
||||||
Patch sent upstream: https://github.com/tvheadend/tvheadend/pull/1062
|
|
||||||
|
|
||||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
|
||||||
---
|
|
||||||
src/sbuf.h | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/src/sbuf.h b/src/sbuf.h
|
|
||||||
index 78aa546b3..d5aa53042 100644
|
|
||||||
--- a/src/sbuf.h
|
|
||||||
+++ b/src/sbuf.h
|
|
||||||
@@ -23,6 +23,7 @@
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
+#include <unistd.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Simple dynamically growing buffer
|
|
||||||
--
|
|
||||||
2.11.0
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
|||||||
# Locally computed
|
# Locally computed
|
||||||
sha256 32f96937a3ffa72b5bdbfde9a5f9f9535f88e94e44864d4c8c6a152985c16569 tvheadend-e06ffd87beff16103c47d6fa542df2374fca6fd3.tar.gz
|
sha256 f12ad165d5abd464fe38c358b385eb030ae4daa01b940c348525d5bfc876e514 tvheadend-66d6161c563181e5a572337ab3509a835c5a57e2.tar.gz
|
||||||
sha256 54dc3cbc00bf126bcba43e2af7f3ad1dc00f335985da1409fa943c7b7256d942 LICENSE.md
|
sha256 54dc3cbc00bf126bcba43e2af7f3ad1dc00f335985da1409fa943c7b7256d942 LICENSE.md
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
TVHEADEND_VERSION = e06ffd87beff16103c47d6fa542df2374fca6fd3
|
TVHEADEND_VERSION = 66d6161c563181e5a572337ab3509a835c5a57e2
|
||||||
TVHEADEND_SITE = $(call github,tvheadend,tvheadend,$(TVHEADEND_VERSION))
|
TVHEADEND_SITE = $(call github,tvheadend,tvheadend,$(TVHEADEND_VERSION))
|
||||||
TVHEADEND_LICENSE = GPL-3.0+
|
TVHEADEND_LICENSE = GPL-3.0+
|
||||||
TVHEADEND_LICENSE_FILES = LICENSE.md
|
TVHEADEND_LICENSE_FILES = LICENSE.md
|
||||||
@ -65,9 +65,9 @@ endif
|
|||||||
|
|
||||||
ifeq ($(BR2_PACKAGE_LIBDVBCSA),y)
|
ifeq ($(BR2_PACKAGE_LIBDVBCSA),y)
|
||||||
TVHEADEND_DEPENDENCIES += libdvbcsa
|
TVHEADEND_DEPENDENCIES += libdvbcsa
|
||||||
TVHEADEND_CONF_OPTS += --enable-dvbcsa
|
TVHEADEND_CONF_OPTS += --enable-tvhcsa
|
||||||
else
|
else
|
||||||
TVHEADEND_CONF_OPTS += --disable-dvbcsa
|
TVHEADEND_CONF_OPTS += --disable-tvhcsa
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(BR2_PACKAGE_LIBHDHOMERUN),y)
|
ifeq ($(BR2_PACKAGE_LIBHDHOMERUN),y)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user