summaryrefslogtreecommitdiff
path: root/tests/unit/test-iov.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/test-iov.c')
-rw-r--r--tests/unit/test-iov.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit/test-iov.c b/tests/unit/test-iov.c
index 0d2ba9ba87..93bda00f0e 100644
--- a/tests/unit/test-iov.c
+++ b/tests/unit/test-iov.c
@@ -186,7 +186,7 @@ static void test_io(void)
close(sv[0]);
FD_SET(sv[1], &fds);
- fcntl(sv[1], F_SETFL, O_RDWR|O_NONBLOCK);
+ g_unix_set_fd_nonblocking(sv[1], true, NULL);
r = g_test_rand_int_range(sz / 2, sz);
setsockopt(sv[1], SOL_SOCKET, SO_SNDBUF, &r, sizeof(r));
@@ -220,7 +220,7 @@ static void test_io(void)
close(sv[1]);
FD_SET(sv[0], &fds);
- fcntl(sv[0], F_SETFL, O_RDWR|O_NONBLOCK);
+ g_unix_set_fd_nonblocking(sv[0], true, NULL);
r = g_test_rand_int_range(sz / 2, sz);
setsockopt(sv[0], SOL_SOCKET, SO_RCVBUF, &r, sizeof(r));
usleep(500000);