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
This commit is contained in:
David van Moolenbroek 2014-08-24 10:16:37 +00:00
parent 970d95ecd5
commit 2e89653e65

View file

@ -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);