From: Florian Forster Date: Wed, 18 Aug 2010 08:22:36 +0000 (+0200) Subject: collectdctl: Reorder includes and set strict C99/POSIX mode. X-Git-Tag: collectd-5.0.0-beta0~46 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9f28473ab8e8b93c1bf19a72f02bb4e799dd7eed;p=collectd.git collectdctl: Reorder includes and set strict C99/POSIX mode. This enables NAN on some systems, e.g. old Linux boxes. --- diff --git a/src/collectdctl.c b/src/collectdctl.c index fe118816..bb7cfca4 100644 --- a/src/collectdctl.c +++ b/src/collectdctl.c @@ -21,25 +21,34 @@ * Sebastian "tokkee" Harl **/ +#ifndef _ISOC99_SOURCE +# define _ISOC99_SOURCE +#endif + +#ifndef _POSIX_C_SOURCE +# define _POSIX_C_SOURCE 200112L +#endif + +#ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE 600 +#endif + #if HAVE_CONFIG_H # include "config.h" #endif -#include "libcollectdclient/client.h" +#include +#include +#include +#include +#include #include - #include - -#include - #include -#include -#include -#include +#include "libcollectdclient/client.h" -#include #define DEFAULT_SOCK LOCALSTATEDIR"/run/"PACKAGE_NAME"-unixsock"