mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
configure: test for pwritev
MacOS doesn't have it apparently. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
8df27a7bbb
commit
8843ab4fb7
23
configure
vendored
23
configure
vendored
@ -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…
Reference in New Issue
Block a user