summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8d913d3)
raw | patch | inline | side by side (parent: 8d913d3)
author | Pierre-Yves Ritschard <pyr@spootnik.org> | |
Fri, 7 Nov 2014 16:34:32 +0000 (17:34 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Thu, 3 Mar 2016 20:23:55 +0000 (21:23 +0100) |
This enables forward compatibility with the ongoing
deprecation of _BSD_SOURCE.
(cherry picked from commit 3bc1a46bebfa53ec0f0e12d6406ca126a3ad6bf3)
deprecation of _BSD_SOURCE.
(cherry picked from commit 3bc1a46bebfa53ec0f0e12d6406ca126a3ad6bf3)
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 5c6720c3901f3d30a71db162f8e170b405470284..fb9ef34cdc80266d08302f7828802f8c1ee6aecf 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 1fb7cb8ad7a877b40cb5fe40684c970786113146..3421c475d7e6fc49c2419332dbcd8e5d3dd09f06 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 0445b14a91f879bdfccb2cd44024586741ce5888..d560f465490dae28bb9241fafd04f35444e78625 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 0188da7ef38407972f5570f47fabcf622db41b4b..e0c09a3b8cafc78c225ee939cd92d7b8b4522ba5 100644 (file)
--- a/src/load.c
+++ b/src/load.c
* Manuel Sanmartin
**/
+#define _DEFAULT_SOURCE
#define _BSD_SOURCE
#include "collectd.h"
diff --git a/src/network.c b/src/network.c
index ae5ed09652729b2fd7b679d8f90936c07eec59f3..0ee6ed0b9834f96a9ad1cd885657c0e5f9719c89 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 f192a826847b6530d30166f9f2a01a4bc672c5db..7ecd889af884ced2331428343b84b27906edb079 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)
@@ -730,7 +731,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 fcc65a56771021e184ce23addd4a508cef3f9622..2b40676353522922446a300343820de422b96497 100644 (file)
--- a/src/utils_dns.c
+++ b/src/utils_dns.c
* Modifications 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 verplant.org>
*/
+#define _DEFAULT_SOURCE
#define _BSD_SOURCE
#include "collectd.h"