tcpconns plugin: Include <bsd/nlist.h> rather than <nlist.h>.
authorFlorian Forster <octo@collectd.org>
Sun, 18 Mar 2012 08:14:54 +0000 (09:14 +0100)
committerFlorian Forster <octo@collectd.org>
Sun, 18 Mar 2012 08:14:54 +0000 (09:14 +0100)
It appears that <nlist.h> is being deprecated / moved.
This hopefully fixes Debian bug #664429.

configure.in
src/tcpconns.c

index 02a6361..1dc23bf 100644 (file)
@@ -1234,6 +1234,7 @@ AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETSWAPINFO, test "x$with_kvm_getswapinfo" = "x
 AC_CHECK_LIB(kvm, kvm_nlist, [with_kvm_nlist="yes"], [with_kvm_nlist="no"])
 if test "x$with_kvm_nlist" = "xyes"
 then
+       AC_CHECK_HEADERS(bsd/nlist.h nlist.h)
        AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
                  [Define to 1 if you have the 'kvm' library with the 'kvm_nlist' symbol (-lkvm)])
        with_libkvm="yes"
index d68cd09..78c337b 100644 (file)
 # include <netinet/tcp_var.h>
 # include <netdb.h>
 # include <arpa/inet.h>
-# include <nlist.h>
+# if !defined(HAVE_BSD_NLIST_H) || !HAVE_BSD_NLIST_H
+#  include <nlist.h>
+# else /* HAVE_BSD_NLIST_H */
+#  include <bsd/nlist.h>
+# endif
 # include <kvm.h>
 #endif /* HAVE_LIBKVM_NLIST */