From 6f29ec3901a06ae905c818b882a80f8a0bd7af42 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Thu, 25 Feb 2016 21:35:53 +0100 Subject: [PATCH] Include strings.h instead of defining _BSD_SOURCE to get strcasecmp. _BSD_SOURCE is deprecated in favor of _DEFAULT_SOURCE but also it's not needed for strcasecmp() when including strings.h in addition to string.h. --- configure.ac | 5 ----- src/core/memstore.c | 1 + src/core/object.c | 1 + src/plugins/backend/collectd/unixsock.c | 1 + src/plugins/backend/mk-livestatus.c | 1 + src/plugins/timeseries/rrdtool.c | 2 ++ src/utils/avltree.c | 1 + 7 files changed, 7 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 95394eb..85e39c3 100644 --- a/configure.ac +++ b/configure.ac @@ -122,11 +122,6 @@ if test "x$enable_standards" = "xyes"; then AC_DEFINE([_THREAD_SAFE], 1, [Define to enable reentrant interfaces.]) - dnl GNU libc defines strcasecmp() only when using _BSD_SOURCE even though - dnl the function is conforming to POSIX.1-2001 as well. Let's weaken - dnl strict standards compliance a bit to work around this. - AC_DEFINE([_BSD_SOURCE], 1, [Define to enable 4.3BSD support.]) - for flag in -std=c99; do AC_MSG_CHECKING([whether $CC accepts $flag]) diff --git a/src/core/memstore.c b/src/core/memstore.c index 2449827..05c879b 100644 --- a/src/core/memstore.c +++ b/src/core/memstore.c @@ -42,6 +42,7 @@ #include #include #include +#include #include diff --git a/src/core/object.c b/src/core/object.c index c39faf4..dfa0655 100644 --- a/src/core/object.c +++ b/src/core/object.c @@ -35,6 +35,7 @@ #include #include +#include /* * private types diff --git a/src/plugins/backend/collectd/unixsock.c b/src/plugins/backend/collectd/unixsock.c index 65b0584..73bca12 100644 --- a/src/plugins/backend/collectd/unixsock.c +++ b/src/plugins/backend/collectd/unixsock.c @@ -44,6 +44,7 @@ #include #include #include +#include SDB_PLUGIN_MAGIC; diff --git a/src/plugins/backend/mk-livestatus.c b/src/plugins/backend/mk-livestatus.c index d1126db..cd8bbd0 100644 --- a/src/plugins/backend/mk-livestatus.c +++ b/src/plugins/backend/mk-livestatus.c @@ -44,6 +44,7 @@ #include #include #include +#include SDB_PLUGIN_MAGIC; diff --git a/src/plugins/timeseries/rrdtool.c b/src/plugins/timeseries/rrdtool.c index 7d6c30b..73f22af 100644 --- a/src/plugins/timeseries/rrdtool.c +++ b/src/plugins/timeseries/rrdtool.c @@ -37,6 +37,8 @@ #include #include +#include +#include #include #ifdef HAVE_RRD_CLIENT_H # include diff --git a/src/utils/avltree.c b/src/utils/avltree.c index 87db2f7..f0987f5 100644 --- a/src/utils/avltree.c +++ b/src/utils/avltree.c @@ -37,6 +37,7 @@ #include #include +#include #include /* -- 2.30.2