moreutils: fix compilation with uClibc-ng
authorRosen Penev <redacted>
Fri, 14 Aug 2020 02:33:06 +0000 (19:33 -0700)
committerRosen Penev <redacted>
Fri, 14 Aug 2020 04:38:40 +0000 (21:38 -0700)
getloadavg is missing not just under cygwin.

Signed-off-by: Rosen Penev <redacted>
utils/moreutils/Makefile
utils/moreutils/patches/010-uclibc.patch [new file with mode: 0644]

index 51e28235bfa9024721e4bd8c41f77d8dbfc997e3..2f2326e75dbe5047509e7177ac3cc63a2bc1cb8f 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=moreutils
 PKG_VERSION:=0.63
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://git.kitenet.net/index.cgi/moreutils.git/snapshot
diff --git a/utils/moreutils/patches/010-uclibc.patch b/utils/moreutils/patches/010-uclibc.patch
new file mode 100644 (file)
index 0000000..8fff106
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/parallel.c
++++ b/parallel.c
+@@ -241,7 +241,7 @@ pid_t create_pipe_child(int *fd, int orig_fd)
+       return pipe_child(fds[0], orig_fd);
+ }
+-#if defined(__CYGWIN__)
++#if defined(__CYGWIN__) || defined(__UCLIBC__)
+ int getloadavg(double loadavg[], int nelem) {
+       int fd, n, elem;
+       char buf[128];
git clone https://git.99rst.org/PROJECT