src/libcollectdclient/network.c: Fix the build on FreeBSD.
authorEd Schouten <ed@80386.nl>
Sat, 17 Nov 2012 09:47:07 +0000 (10:47 +0100)
committerFlorian Forster <octo@collectd.org>
Sat, 17 Nov 2012 11:42:48 +0000 (12:42 +0100)
On FreeBSD, we have to include <netinet/in.h> to get IN_MULTICAST(). We
don't need to include anything extra, as according to POSIX,
<netinet/in.h> also exposes htonl(). There is no need to include
<arpa/inet.h>.

Signed-off-by: Florian Forster <octo@collectd.org>
src/libcollectdclient/network.c

index 02a8e96..6b6450c 100644 (file)
@@ -24,6 +24,8 @@
  *   Florian octo Forster <octo at collectd.org>
  **/
 
+#include "collectd.h"
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/socket.h>
 #include <netdb.h>
 
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+
 #include "collectd/network.h"
 #include "collectd/network_buffer.h"