zabbix: do not build with uClibc-ng 13117/head
authorRosen Penev <rosenp@gmail.com>
Fri, 14 Aug 2020 02:27:57 +0000 (19:27 -0700)
committerRosen Penev <rosenp@gmail.com>
Fri, 14 Aug 2020 04:41:33 +0000 (21:41 -0700)
It's missing functionality necessary for zabbix.

Remove now pointless patch.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
admin/zabbix/Makefile
admin/zabbix/patches/002-uclibc_loadavg.patch [deleted file]

index ca189c140b2a2f038fceb3c6fd9bf7885f6c9ce6..b8543aa575ee1849503486b8209edbd92083c400 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zabbix
 PKG_VERSION:=5.0.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://cdn.zabbix.com/zabbix/sources/stable/5.0/
@@ -74,7 +74,7 @@ define Package/zabbix/Default
   TITLE:=Zabbix
   URL:=https://www.zabbix.com/
   USERID:=zabbix=53:zabbix=53
-  DEPENDS += $(ICONV_DEPENDS) +libpcre +zlib +ZABBIX_GNUTLS:libgnutls +ZABBIX_OPENSSL:libopenssl
+  DEPENDS += $(ICONV_DEPENDS) +libpcre +zlib +ZABBIX_GNUTLS:libgnutls +ZABBIX_OPENSSL:libopenssl @!USE_UCLIBC
 endef
 
 define Package/zabbix-agentd
diff --git a/admin/zabbix/patches/002-uclibc_loadavg.patch b/admin/zabbix/patches/002-uclibc_loadavg.patch
deleted file mode 100644 (file)
index ce62d06..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
---- a/src/libs/zbxsysinfo/linux/cpu.c
-+++ b/src/libs/zbxsysinfo/linux/cpu.c
-@@ -22,6 +22,45 @@
- #include "stats.h"
- #include "log.h"
-+
-+/* 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
-+
- int   SYSTEM_CPU_NUM(AGENT_REQUEST *request, AGENT_RESULT *result)
- {
-       char    *type;