From: Ruben Kerkhof Date: Sat, 31 Mar 2018 10:16:28 +0000 (+0200) Subject: Merge pull request #2688 from dstathis/master X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=d929cb64e9f243a080402769bf5e4626c9b5e9d3;hp=-c;p=collectd.git Merge pull request #2688 from dstathis/master change HAVE_UDEV_H to HAVE_LIBUDEV_H for bug 2651 --- d929cb64e9f243a080402769bf5e4626c9b5e9d3 diff --combined src/disk.c index 45706bc2,04f33741..116fc244 --- a/src/disk.c +++ b/src/disk.c @@@ -120,9 -120,6 +120,9 @@@ static struct gmesh geom_tree /* #endif KERNEL_FREEBSD */ #elif HAVE_LIBKSTAT +#if HAVE_KSTAT_H +#include +#endif #define MAX_NUMDISK 1024 extern kstat_ctl_t *kc; static kstat_t *ksp[MAX_NUMDISK]; @@@ -142,7 -139,7 +142,7 @@@ static int pnumdisk #error "No applicable input method." #endif - #if HAVE_UDEV_H + #if HAVE_LIBUDEV_H #include static char *conf_udev_name_attr = NULL; @@@ -176,7 -173,7 +176,7 @@@ static int disk_config(const char *key "on Mach / Mac OS X and will be ignored."); #endif } else if (strcasecmp("UdevNameAttr", key) == 0) { - #if HAVE_UDEV_H + #if HAVE_LIBUDEV_H if (conf_udev_name_attr != NULL) { free(conf_udev_name_attr); conf_udev_name_attr = NULL; @@@ -212,7 -209,7 +212,7 @@@ static int disk_init(void) /* #endif HAVE_IOKIT_IOKITLIB_H */ #elif KERNEL_LINUX - #if HAVE_UDEV_H + #if HAVE_LIBUDEV_H if (conf_udev_name_attr != NULL) { handle_udev = udev_new(); if (handle_udev == NULL) { @@@ -220,7 -217,7 +220,7 @@@ return -1; } } - #endif /* HAVE_UDEV_H */ + #endif /* HAVE_LIBUDEV_H */ /* #endif KERNEL_LINUX */ #elif KERNEL_FREEBSD @@@ -263,10 -260,10 +263,10 @@@ static int disk_shutdown(void) { #if KERNEL_LINUX - #if HAVE_UDEV_H + #if HAVE_LIBUDEV_H if (handle_udev != NULL) udev_unref(handle_udev); - #endif /* HAVE_UDEV_H */ + #endif /* HAVE_LIBUDEV_H */ #endif /* KERNEL_LINUX */ return 0; } /* int disk_shutdown */ @@@ -328,7 -325,7 +328,7 @@@ static counter_t disk_calc_time_incr(co } #endif - #if HAVE_UDEV_H + #if HAVE_LIBUDEV_H /** * Attempt to provide an rename disk instance from an assigned udev attribute. * @@@ -844,7 -841,7 +844,7 @@@ static int disk_read(void) output_name = disk_name; - #if HAVE_UDEV_H + #if HAVE_LIBUDEV_H char *alt_name = NULL; if (conf_udev_name_attr != NULL) { alt_name = @@@ -855,7 -852,7 +855,7 @@@ #endif if (ignorelist_match(ignorelist, output_name) != 0) { - #if HAVE_UDEV_H + #if HAVE_LIBUDEV_H /* release udev-based alternate name, if allocated */ sfree(alt_name); #endif @@@ -881,7 -878,7 +881,7 @@@ submit_io_time(output_name, io_time, weighted_time); } /* if (is_disk) */ - #if HAVE_UDEV_H + #if HAVE_LIBUDEV_H /* release udev-based alternate name, if allocated */ sfree(alt_name); #endif