diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 65d1578..5a1e720 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: - name: Configure build run: | autoreconf --install - ./configure CFLAGS='-O0 -g -Wall -Wextra -Wpedantic' + ./configure CFLAGS='-O0 -g -std=c99 -Wall -Wextra -Wpedantic' - name: Compile run: make - name: Run tests diff --git a/configure.ac b/configure.ac index f34de68..12aacdf 100644 --- a/configure.ac +++ b/configure.ac @@ -49,5 +49,8 @@ m4_define([CTLSEQS_LT_REVISION], [0]) m4_define([CTLSEQS_LT_AGE], [0]) AC_SUBST([CTLSEQS_LT_VERSION], [CTLSEQS_LT_CURRENT:CTLSEQS_LT_REVISION:CTLSEQS_LT_AGE]) +# Assume that POSIX.1-2008 is supported. +AC_DEFINE([_POSIX_C_SOURCE], [200809L], [Feature test macro for POSIX.1-2008]) + AC_CONFIG_FILES([Makefile doc/Makefile man/Makefile src/Makefile tests/Makefile examples/Makefile]) AC_OUTPUT diff --git a/examples/sixdraw.c b/examples/sixdraw.c index 663d90e..1b39340 100644 --- a/examples/sixdraw.c +++ b/examples/sixdraw.c @@ -36,6 +36,7 @@ #include #include +#include #include #include #include diff --git a/tests/tcsgrep.c b/tests/tcsgrep.c index 6fe340e..f26047d 100644 --- a/tests/tcsgrep.c +++ b/tests/tcsgrep.c @@ -28,6 +28,7 @@ #include #include +#include #include #include