64843258ce
Re-add patch 0001 to fix uClibc build, this patch was removed 2019: https://git.buildroot.net/buildroot/commit/?id=573d15b0790cfd2838cf0544ded79b415e20f5a7 Add two more patches from Alpine Linux to fix musl build. Add optional dependency to libexecinfo to provide execinfo.h. Add a patch that ensures an internal gettext symbol doesn't get used except on glibc and uclibc toolchains. Indeed, both glibc and uclibc provide the _nl_msg_cat_cntr variable, but not the musl implementation. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
56 lines
1.2 KiB
Diff
56 lines
1.2 KiB
Diff
Fix compilation with uClibc
|
|
|
|
Ported from
|
|
https://github.com/stschake/buildroot-grasshopper/blob/master/package/torsmo/torsmo-0.18-uclibc-getloadavg.patch
|
|
|
|
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
|
|
|
diff -uwNr vdr-2.3.1.org/skinlcars.c vdr-2.3.1/skinlcars.c
|
|
--- vdr-2.3.1.org/skinlcars.c 2015-09-01 12:07:07.000000000 +0200
|
|
+++ vdr-2.3.1/skinlcars.c 2016-07-31 21:00:11.000000000 +0200
|
|
@@ -1100,6 +1100,44 @@
|
|
}
|
|
}
|
|
|
|
+/* uclibc and dietlibc do not have this junk -ReneR */
|
|
+#if defined (__UCLIBC__) || defined (__dietlibc__)
|
|
+static int getloadavg (double loadavg[], int nelem)
|
|
+{
|
|
+ int fd;
|
|
+
|
|
+ fd = open ("/proc/loadavg", O_RDONLY);
|
|
+ if (fd < 0)
|
|
+ return -1;
|
|
+ else
|
|
+ {
|
|
+ char buf[65], *p;
|
|
+ ssize_t nread;
|
|
+ int i;
|
|
+
|
|
+ nread = read (fd, buf, sizeof buf - 1);
|
|
+ close (fd);
|
|
+ if (nread <= 0)
|
|
+ return -1;
|
|
+ buf[nread - 1] = '\0';
|
|
+
|
|
+ if (nelem > 3)
|
|
+ nelem = 3;
|
|
+ p = buf;
|
|
+ for (i = 0; i < nelem; ++i)
|
|
+ {
|
|
+ char *endp;
|
|
+ loadavg[i] = strtod (p, &endp);
|
|
+ if (endp == p)
|
|
+ return -1;
|
|
+ p = endp;
|
|
+ }
|
|
+
|
|
+ return i;
|
|
+ }
|
|
+}
|
|
+#endif
|
|
+
|
|
void cSkinLCARSDisplayMenu::DrawLoad(void)
|
|
{
|
|
if (yb04) {
|