summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2023-05-17 01:13:13 -0500
committerDanny Holman <dholman@gymli.org>2023-05-17 01:13:13 -0500
commitca7f320b9a7ae56982d50240fc0ee5ce4b9aea89 (patch)
treeca9a9a068f45653be08b52f041fa925f01de79fb
parentc0e9790335313adb40435b6be06cc41114c0f2c9 (diff)
server: add headers to check function
Add stdarg.h and time.h to the check headers function in the configure script. Signed-off-by: Danny Holman <dholman@gymli.org>
-rw-r--r--server/configure.ac2
-rw-r--r--server/include/logging.h1
-rw-r--r--server/include/mini-rat.h8
3 files changed, 9 insertions, 2 deletions
diff --git a/server/configure.ac b/server/configure.ac
index 4309259..d975d97 100644
--- a/server/configure.ac
+++ b/server/configure.ac
@@ -9,7 +9,7 @@ AC_CONFIG_MACRO_DIR([../m4])
AM_INIT_AUTOMAKE([1.16 -Wall -Werror foreign subdir-objects])
AC_CONFIG_FILES([Makefile])
-AC_CHECK_HEADERS([stdio.h stdlib.h string.h pthread.h arpa/inet.h sys/socket.h], [], AC_MSG_ERROR([missing required headers]))
+AC_CHECK_HEADERS([stdio.h stdlib.h string.h stdarg.h pthread.h arpa/inet.h sys/socket.h time.h], [], AC_MSG_ERROR([missing required headers]))
AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS+=" -Wall"])
AX_CHECK_COMPILE_FLAG([-Wextra], [CFLAGS+= "-Wextra"])
diff --git a/server/include/logging.h b/server/include/logging.h
index 39745db..6396ac0 100644
--- a/server/include/logging.h
+++ b/server/include/logging.h
@@ -2,7 +2,6 @@
#define MRAT_LOGGING_H
#include <mini-rat.h>
-#include <stdarg.h>
enum LOG_LEVEL {
LOG_SEVERE,
diff --git a/server/include/mini-rat.h b/server/include/mini-rat.h
index c3f076e..8c9aad3 100644
--- a/server/include/mini-rat.h
+++ b/server/include/mini-rat.h
@@ -53,4 +53,12 @@
#include <unistd.h>
#endif
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+
+#ifdef HAVE_STDARG_H
+#include <stdarg.h>
+#endif
+
#endif // ifndef MINI_RAT_H