From: David van Moolenbroek Date: Sun, 24 Aug 2014 10:16:37 +0000 (+0000) Subject: libc: make socketpair(3) use the right device X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/expt.png?a=commitdiff_plain;h=2e89653e65c25c480c40ec47d9e27349f1279c8c;p=minix.git 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 --- 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);