summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0fceb45)
raw | patch | inline | side by side (parent: 0fceb45)
author | Claudius Zingerli <gitmail@zeuz.ch> | |
Tue, 16 Feb 2016 13:27:14 +0000 (14:27 +0100) | ||
committer | Claudius Zingerli <gitmail@zeuz.ch> | |
Fri, 29 Apr 2016 15:36:33 +0000 (17:36 +0200) |
src/chrony.c | patch | blob | history |
diff --git a/src/chrony.c b/src/chrony.c
index f170f67ecd1153968f2148f73b31731798eed558..d40bbef5625fb67d11b15aea746777e99a5a32a7 100644 (file)
--- a/src/chrony.c
+++ b/src/chrony.c
* -> Done at higher levels
*/
-/* getaddrinfo */
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-
-#include <arpa/inet.h> /* ntohs/ntohl */
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h> /* getaddrinfo */
+#endif
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+#if HAVE_NETDB_H
+# include <netdb.h>
+#endif
+#if HAVE_ARPA_INET_H
+# include <arpa/inet.h> /* ntohs/ntohl */
+#endif
#include "collectd.h"
#include "common.h" /* auxiliary functions */
#define CHRONY_DEFAULT_TIMEOUT 2
/* Return codes (collectd expects non-zero on errors) */
-#define CHRONY_RC_OK (int)0
-#define CHRONY_RC_FAIL (int)1
+#define CHRONY_RC_OK 0
+#define CHRONY_RC_FAIL 1
-/* Variables adapted from chrony/candm.h */
+/* Variables adapted from chrony/candm.h (GPL2)*/
/*BEGIN*/
#define PROTO_VERSION_NUMBER 6
#define IPADDR_UNSPEC 0