#880071 redsocks: FTBFS on non-linux: error: SPLICE_F_MOVE/SPLICE_F_NONBLOCK undeclared

#880071#5
Date:
2017-10-29 09:56:00 UTC
From:
To:
Hi,

redsocks FTBFS on hurd-i386 and kfreebsd/*:

https://buildd.debian.org/status/package.php?p=redsocks

cc -g -O2 -fdebug-prefix-map=/«PKGBUILDDIR»=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -std=c99 -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE -D_GNU_SOURCE -Wall -Wdate-time -D_FORTIFY_SOURCE=2  -c -o redsocks.o redsocks.c
redsocks.c: In function 'redsplice_write_cb':
redsocks.c:438:25: warning: implicit declaration of function 'splice' [-Wimplicit-function-declaration]
    const ssize_t sent = splice(c->pisrc->read, NULL, out, NULL, avail, SPLICE_F_MOVE|SPLICE_F_NONBLOCK);
                         ^~~~~~
redsocks.c:438:72: error: 'SPLICE_F_MOVE' undeclared (first use in this function)
    const ssize_t sent = splice(c->pisrc->read, NULL, out, NULL, avail, SPLICE_F_MOVE|SPLICE_F_NONBLOCK);
                                                                        ^~~~~~~~~~~~~
redsocks.c:438:72: note: each undeclared identifier is reported only once for each function it appears in
redsocks.c:438:86: error: 'SPLICE_F_NONBLOCK' undeclared (first use in this function)
    const ssize_t sent = splice(c->pisrc->read, NULL, out, NULL, avail, SPLICE_F_MOVE|SPLICE_F_NONBLOCK);
                                                                                      ^~~~~~~~~~~~~~~~~
redsocks.c: In function 'redsplice_read_cb':
redsocks.c:506:70: error: 'SPLICE_F_MOVE' undeclared (first use in this function)
  const ssize_t got = splice(in, NULL, c->dst->write, NULL, pipesize, SPLICE_F_MOVE|SPLICE_F_NONBLOCK);
                                                                      ^~~~~~~~~~~~~
redsocks.c:506:84: error: 'SPLICE_F_NONBLOCK' undeclared (first use in this function)
  const ssize_t got = splice(in, NULL, c->dst->write, NULL, pipesize, SPLICE_F_MOVE|SPLICE_F_NONBLOCK);
                                                                                    ^~~~~~~~~~~~~~~~~
<builtin>: recipe for target 'redsocks.o' failed
make[1]: *** [redsocks.o] Error 1


If this is not trivially fixable, please request removal of the
outdated binary packages.


Andreas