Browse Source

configure: test for pwritev

MacOS doesn't have it apparently.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
travis-debug
Rusty Russell 5 years ago
parent
commit
8843ab4fb7
  1. 23
      configure

23
configure

@ -292,6 +292,29 @@ code=
#error "Not modern GCC"
#endif
/*END*/
var=HAVE_PWRITEV
desc=pwritev() defined
style=DEFINES_EVERYTHING|EXECUTE|MAY_NOT_COMPILE
code=
#include <sys/uio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
int main(void)
{
struct iovec iov[2];
int fd = open("/dev/null", O_WRONLY);
iov[0].iov_base = "hello";
iov[0].iov_len = 5;
iov[1].iov_base = " world";
iov[1].iov_len = 6;
if (pwritev(fd, iov, 2, 0) == 11)
return 0;
return 1;
}
/*END*/
EOF
mv $CONFIG_VAR_FILE.$$ $CONFIG_VAR_FILE

Loading…
Cancel
Save