summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ad742ff)
raw | patch | inline | side by side (parent: ad742ff)
author | Pierre-Yves Ritschard <pyr@spootnik.org> | |
Fri, 7 Nov 2014 16:34:32 +0000 (17:34 +0100) | ||
committer | Pierre-Yves Ritschard <pyr@spootnik.org> | |
Fri, 7 Nov 2014 16:34:32 +0000 (17:34 +0100) |
This enables forward compatibility with the ongoing
deprecation of _BSD_SOURCE.
deprecation of _BSD_SOURCE.
configure.ac | patch | blob | history | |
src/dns.c | patch | blob | history | |
src/exec.c | patch | blob | history | |
src/load.c | patch | blob | history | |
src/network.c | patch | blob | history | |
src/ntpd.c | patch | blob | history | |
src/utils_dns.c | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index 1a8de1b26adfe214b45197a8b59e02d6cf4a5530..a00eebb1b6a95aee838e8848e96ca7a3983f2af5 100644 (file)
--- a/configure.ac
+++ b/configure.ac
AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
[#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
#if HAVE_STDINT_H
# include <stdint.h>
#endif
])
AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
[#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
#if HAVE_STDINT_H
# include <stdint.h>
#endif
diff --git a/src/dns.c b/src/dns.c
index 00fcff191e0ccf0177ec7bea309eb2964b331228..fd75dc93a9437fb9bd0d7a580c1937e26f19b859 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
* Mirko Buffoni <briareos at eswat.org>
**/
+#define _DEFAULT_SOURCE
#define _BSD_SOURCE
#include "collectd.h"
diff --git a/src/exec.c b/src/exec.c
index cb6844b86ce928696f8111b316fd61cf1dfd4704..a2b0915c7c1e94c48a24d8730d55e7e798b2215b 100644 (file)
--- a/src/exec.c
+++ b/src/exec.c
* Peter Holik <peter at holik.at>
**/
+#define _DEFAULT_SOURCE
#define _BSD_SOURCE /* For setgroups */
#include "collectd.h"
diff --git a/src/load.c b/src/load.c
index f63147657d6394940aad54e4276994ef05b55a98..18b5f8e87457b2f9dbdc9e723e9f6b6da9967843 100644 (file)
--- a/src/load.c
+++ b/src/load.c
* Vedran Bartonicek <vbartoni at gmail.com>
**/
+#define _DEFAULT_SOURCE
#define _BSD_SOURCE
#include "collectd.h"
diff --git a/src/network.c b/src/network.c
index bf0b2bc647e63f7de410e561dd2d9b16817fbd7c..9fbba9622fd7fac39ef8ff56ea8fb33a1fc1a308 100644 (file)
--- a/src/network.c
+++ b/src/network.c
* Aman Gupta <aman at tmm1.net>
**/
+#define _DEFAULT_SOURCE
#define _BSD_SOURCE /* For struct ip_mreq */
#include "collectd.h"
network_config_ttl = tmp;
else {
WARNING ("network plugin: The `TimeToLive' must be between 1 and 255.");
- return (-1);
+ return (-1);
}
return (0);
diff --git a/src/ntpd.c b/src/ntpd.c
index 6bed82c22c670a62dca5614345771e51d4678d6b..15b12f92bedd4b6cbd2a1be0f87967a7a62f62e4 100644 (file)
--- a/src/ntpd.c
+++ b/src/ntpd.c
* Florian octo Forster <octo at collectd.org>
**/
+#define _DEFAULT_SOURCE
#define _BSD_SOURCE /* For NI_MAXHOST */
#include "collectd.h"
poll_s.fd = sd;
poll_s.events = POLLIN | POLLPRI;
poll_s.revents = 0;
-
+
DEBUG ("Polling for %ims", timeout);
status = poll (&poll_s, 1, timeout);
DEBUG ("recv'd %i bytes", status);
- /*
+ /*
* Do some sanity checks first
*/
if (status < RESP_HEADER_SIZE)
@@ -736,7 +737,7 @@ static int ntpd_send_request (int req_code, int req_items, int req_size, char *r
req.err_nitems = ERR_NITEMS (0, req_items);
req.mbz_itemsize = MBZ_ITEMSIZE (req_size);
-
+
if (req_data != NULL)
memcpy ((void *) req.data, (const void *) req_data, req_data_len);
diff --git a/src/utils_dns.c b/src/utils_dns.c
index 712b1aece8e3b1fe584715ee7e0e1e128cec97f4..eefde9683de10c25f100a9ec99056bf6e77ba549 100644 (file)
--- a/src/utils_dns.c
+++ b/src/utils_dns.c
* Copyright (C) 2006 Florian octo Forster
* Copyright (C) 2002 The Measurement Factory, Inc.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* Florian octo Forster <octo at collectd.org>
*/
+#define _DEFAULT_SOURCE
#define _BSD_SOURCE
#include "collectd.h"