1 Fix compilation with uClibc
4 https://github.com/stschake/buildroot-grasshopper/blob/master/package/torsmo/torsmo-0.18-uclibc-getloadavg.patch
6 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
8 diff -uwNr vdr-2.3.1.org/skinlcars.c vdr-2.3.1/skinlcars.c
9 --- vdr-2.3.1.org/skinlcars.c 2015-09-01 12:07:07.000000000 +0200
10 +++ vdr-2.3.1/skinlcars.c 2016-07-31 21:00:11.000000000 +0200
11 @@ -1099,6 +1099,44 @@
15 +/* uclibc and dietlibc do not have this junk -ReneR */
16 +#if defined (__UCLIBC__) || defined (__dietlibc__)
17 +static int getloadavg (double loadavg[], int nelem)
21 + fd = open ("/proc/loadavg", O_RDONLY);
30 + nread = read (fd, buf, sizeof buf - 1);
34 + buf[nread - 1] = '\0';
39 + for (i = 0; i < nelem; ++i)
42 + loadavg[i] = strtod (p, &endp);
53 void cSkinLCARSDisplayMenu::DrawLoad(void)