From 2e89653e65c25c480c40ec47d9e27349f1279c8c Mon Sep 17 00:00:00 2001 From: David van Moolenbroek Date: Sun, 24 Aug 2014 10:16:37 +0000 Subject: [PATCH] libc: make socketpair(3) use the right device UDS expects the device number of the actual socket, not the device on which the socket happens to reside. The code worked only because PFS returned the same value in the st_dev stat field, which it will have to continue doing for a while now. Change-Id: I426d38a86a96307ff6e6ed8099d37dae02d6bf2b --- minix/lib/libc/sys/socketpair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/minix/lib/libc/sys/socketpair.c b/minix/lib/libc/sys/socketpair.c index d8ce4de7a..aa07c7399 100644 --- a/minix/lib/libc/sys/socketpair.c +++ b/minix/lib/libc/sys/socketpair.c @@ -116,7 +116,7 @@ static int _uds_socketpair(int type, int protocol, int sv[2]) return -1; } - dev = sbuf.st_dev; + dev = sbuf.st_rdev; /* connect the sockets sv[0] and sv[1] */ r= ioctl(sv[0], NWIOSUDSPAIR, &dev); -- 2.44.0