collectd: 5.6.0 -> 5.7.0

This commit is contained in:
Franz Pletz 2017-01-22 01:38:50 +01:00
parent 77c891f55c
commit 281a56af4a
No known key found for this signature in database
GPG key ID: 846FDED7792617B4
2 changed files with 4 additions and 63 deletions

View file

@ -9,6 +9,7 @@
, libdbi ? null
, libgcrypt ? null
, libmemcached ? null, cyrus_sasl ? null
, libmicrohttpd ? null
, libmodbus ? null
, libnotify ? null, gdk_pixbuf ? null
, liboping ? null
@ -34,24 +35,19 @@
, libmnl ? null
}:
stdenv.mkDerivation rec {
version = "5.6.0";
version = "5.7.0";
name = "collectd-${version}";
src = fetchurl {
url = "http://collectd.org/files/${name}.tar.bz2";
sha256 = "08w6fjzczi2psk7va0xkjh9pigpar6sbjx2a6ayq4dmc3zcvpzzh";
sha256 = "1cpjkv4d0iifngihxikzljavya0r2k3blarlahamgbdsqsymz815";
};
buildInputs = [
pkgconfig curl iptables libatasmart libcredis libdbi libgcrypt libmemcached
cyrus_sasl libmodbus libnotify gdk_pixbuf liboping libpcap libsigrok libvirt
lm_sensors libxml2 lvm2 libmysql postgresql protobufc rabbitmq-c rrdtool
varnish yajl jdk libtool python udev net_snmp hiredis libmnl
];
patches = [
# Replace deprecated readdir_r() with readdir() to avoid a fatal warning.
./readdir-fix.patch
varnish yajl jdk libtool python udev net_snmp hiredis libmnl libmicrohttpd
];
# for some reason libsigrok isn't auto-detected

View file

@ -1,55 +0,0 @@
diff -Naur collectd-5.6.0/src/vserver.c collectd-5.6.0/src/vserver.c
--- collectd-5.6.0/src/vserver.c 2016-09-11 01:10:25.279038699 -0700
+++ collectd-5.6.0/src/vserver.c 2016-09-25 07:44:40.771177458 -0700
@@ -132,15 +132,8 @@
static int vserver_read (void)
{
-#if NAME_MAX < 1024
-# define DIRENT_BUFFER_SIZE (sizeof (struct dirent) + 1024 + 1)
-#else
-# define DIRENT_BUFFER_SIZE (sizeof (struct dirent) + NAME_MAX + 1)
-#endif
-
DIR *proc;
struct dirent *dent; /* 42 */
- char dirent_buffer[DIRENT_BUFFER_SIZE];
errno = 0;
proc = opendir (PROCDIR);
@@ -165,19 +158,23 @@
int status;
- status = readdir_r (proc, (struct dirent *) dirent_buffer, &dent);
- if (status != 0)
- {
- char errbuf[4096];
- ERROR ("vserver plugin: readdir_r failed: %s",
- sstrerror (errno, errbuf, sizeof (errbuf)));
- closedir (proc);
- return (-1);
- }
- else if (dent == NULL)
+ errno = 0;
+ dent = readdir (proc);
+ if (dent == NULL)
{
- /* end of directory */
- break;
+ if (errno != 0)
+ {
+ char errbuf[4096];
+ ERROR ("vserver plugin: readdir failed: %s",
+ sstrerror (errno, errbuf, sizeof (errbuf)));
+ closedir (proc);
+ return (-1);
+ }
+ else
+ {
+ /* end of directory */
+ break;
+ }
}
if (dent->d_name[0] == '.')