summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d1e2c6d)
raw | patch | inline | side by side (parent: d1e2c6d)
author | Florian Forster <octo@collectd.org> | |
Fri, 3 Jul 2015 10:31:32 +0000 (12:31 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Fri, 3 Jul 2015 10:31:32 +0000 (12:31 +0200) |
Apparently defining this in the source files confuses Solaris' libc.
Thanks to @dago for looking into this.
Hopefully fixes: #978
Thanks to @dago for looking into this.
Hopefully fixes: #978
src/Makefile.am | patch | blob | history | |
src/collectd-tg.c | patch | blob | history |
diff --git a/src/Makefile.am b/src/Makefile.am
index 611381c4602cb705612322b3cc869c3b12bc5b69..877a785f9fd8b05433dbdbcfb307aee3e9e0aa01 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
collectdctl_DEPENDENCIES = libcollectdclient/libcollectdclient.la
collectd_tg_SOURCES = collectd-tg.c
-collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
+collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) \
+ -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 \
+ -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
collectd_tg_LDADD = daemon/libheap.la
if BUILD_WITH_LIBSOCKET
collectd_tg_LDADD += -lsocket
diff --git a/src/collectd-tg.c b/src/collectd-tg.c
index 501567da6ed2db0f4df82c0c60bc1cd8105f4386..760162c7ec025a7266544de893b207a4332a13fa 100644 (file)
--- a/src/collectd-tg.c
+++ b/src/collectd-tg.c
# include "config.h"
#endif
-#ifndef _ISOC99_SOURCE
-# define _ISOC99_SOURCE
-#endif
-
-#ifndef _POSIX_C_SOURCE
-# define _POSIX_C_SOURCE 200809L
-#endif
-
-#ifndef _XOPEN_SOURCE
-# define _XOPEN_SOURCE 700
-#endif
-
#if !__GNUC__
# define __attribute__(x) /**/
#endif