commit: 3d699fc33f744ab5ef71b3f1b0730338aeee5064
parent 0c732a596fde2caa0e3eff2469bf2c3f3ec015c9
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Mon, 1 Apr 2024 09:35:36 +0200
configure: Fix splice check_conftest
Tested on both Linux and FreeBSD, latter of which doesn't have splice(2).
Diffstat:
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
@@ -105,14 +105,9 @@ check_conftest() {
printf 'Checking if conftest %s compiles ...' "$conftest"
- out="$(${CC} ${CFLAGS} -c -o /dev/null "${conftest}" 2>&1)"
- status="$?"
+ ${CC} ${CFLAGS} -Werror=implicit-function-declaration -c -o /dev/null "${conftest}" 2>&1
is_ok
-
- echo "$out"
-
- return $status
}
## User configuration
diff --git a/configure.d/splice.c b/configure.d/splice.c
@@ -8,6 +8,7 @@
#include <fcntl.h> // splice
#include <stdint.h> // SIZE_MAX
+#include <unistd.h> // ssize_t
ssize_t
test(int in, int out)