Module: check_mk
Branch: master
Commit: 64d942868517fdf1de57f7a8f6095944c95f9315
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=64d942868517fd…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue Mar 1 11:11:46 2016 +0100
Make our C compiler/header requirements explicit.
---
livestatus/src/Makefile.am | 2 +-
livestatus/src/logger.c | 3 +++
livestatus/src/module.c | 3 +++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/livestatus/src/Makefile.am b/livestatus/src/Makefile.am
index deab289..4cc5099 100644
--- a/livestatus/src/Makefile.am
+++ b/livestatus/src/Makefile.am
@@ -51,7 +51,7 @@ livestatus_so_SOURCES = \
ContactgroupsColumn.cc CustomTimeperiodColumn.cc HostServiceState.cc opids.cc auth.cc
livestatus_so_CXXFLAGS = -std=c++11 -fPIC
-livestatus_so_CFLAGS = -fPIC
+livestatus_so_CFLAGS = -std=c99 -fPIC
livestatus.o: $(livestatus_so_OBJECTS) $(livestatus_so_DEPENDENCIES)
-rm -f plugin.so
diff --git a/livestatus/src/logger.c b/livestatus/src/logger.c
index 168ecbd..3be66ee 100644
--- a/livestatus/src/logger.c
+++ b/livestatus/src/logger.c
@@ -22,6 +22,9 @@
// to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
// Boston, MA 02110-1301 USA.
+// Needed for localtime_r
+#define _XOPEN_SOURCE 500
+
#include "logger.h"
#include <errno.h>
#include <pthread.h>
diff --git a/livestatus/src/module.c b/livestatus/src/module.c
index 0671efd..59b0062 100644
--- a/livestatus/src/module.c
+++ b/livestatus/src/module.c
@@ -22,6 +22,9 @@
// to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
// Boston, MA 02110-1301 USA.
+// Needed for strdup and S_ISSOCK
+#define _XOPEN_SOURCE 500
+
// IWYU pragma: no_include <bits/socket_type.h>
#include "config.h"
#include <errno.h>