Closed
Description
based on debian testing, on (kfreebsd-amd64)
https://buildd.debian.org/status/fetch.php?pkg=libiio&arch=kfreebsd-amd64&ver=0.18-1&stamp=1565884272&raw=0
/usr/bin/cc -DLIBIIO_EXPORTS=1 -DMATLAB_BINDINGS_API=1 -DNETWORK_BACKEND=1 -DSERIAL_BACKEND=1 -DXML_BACKEND=1 -D_POSIX_C_SOURCE=200809L -D__XSI_VISIBLE=500 -Diio_EXPORTS -I/<<PKGBUILDDIR>> -I/<<PKGBUILDDIR>>/build -I/usr/include/libxml2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wpedantic -fPIC -std=c99 -o CMakeFiles/iio.dir/network.c.o -c /<<PKGBUILDDIR>>/network.c
/<<PKGBUILDDIR>>/network.c: In function ‘create_cancel_fd’:
/<<PKGBUILDDIR>>/network.c:240:8: warning: implicit declaration of function ‘pipe2’; did you mean ‘pipe’? [-Wimplicit-function-declaration]
ret = pipe2(io_ctx->cancel_fd, O_CLOEXEC | O_NONBLOCK);
^~~~~
pipe
based on the freebsd pipe2 man page,https://www.freebsd.org/cgi/man.cgi?pipe(2)
#include <unistd.h>
int pipe2(int pipefd[2], int flags);
which we are - but we are still getting the warning...
For Linux - pipe2 only shows up with _GNU_SOURCE, which we only do on Linux, not on freebsd (so I'm not familiar enough with freebsd to know if that is the problem or not).
-Robin