aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Łyszczek <michal.lyszczek@bofc.pl>2017-05-25 00:23:52 +0200
committerMichał Łyszczek <michal.lyszczek@bofc.pl>2017-05-25 00:23:52 +0200
commit5153a00e7b727d82bf53c77a10d85e48a384aa98 (patch)
tree918f252f4f3ce648e5819232db76500b6c63bcce
parent89f9c97cfbba40809665f26be21392c8e774cc7b (diff)
downloadmemperf-5153a00e7b727d82bf53c77a10d85e48a384aa98.tar.gz
memperf-5153a00e7b727d82bf53c77a10d85e48a384aa98.tar.bz2
memperf-5153a00e7b727d82bf53c77a10d85e48a384aa98.zip
Fix some portability problems on c89 compilersHEADmaster
-rw-r--r--configure.ac2
-rw-r--r--src/utils.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index d488af8..7509deb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,6 +5,8 @@ AC_CONFIG_HEADERS([config.h])
AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"])
AX_CHECK_COMPILE_FLAG([-Wextra], [CFLAGS="$CFLAGS -Wextra"])
AC_CHECK_FUNCS(clock_gettime)
+AC_DEFINE([_POSIX_C_SOURCE], [199309L], [Define the POSIX version])
AC_PROG_CC
+AC_PROG_CC_C89
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT
diff --git a/src/utils.c b/src/utils.c
index d1a5cc0..6df9532 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -7,6 +7,8 @@
/* ==== Include files ======================================================= */
+#include "config.h"
+#include "opts.h"
#include "utils.h"
#include <assert.h>
@@ -14,8 +16,6 @@
#include <string.h>
#include <time.h>
-#include "config.h"
-#include "opts.h"
/* ==== Public functions ==================================================== */