Set the socket family in recvfrom() (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 14 Sep 2016 18:32:03 +0000 (14:32 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 16 Sep 2016 21:45:34 +0000 (17:45 -0400)
We were setting the port and address, but not the family.

Rebuild glibc.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/recvfrom.c

index 5ff2283..a191c50 100644 (file)
@@ -46,6 +46,7 @@ static ssize_t __recvfrom_udp(int fd, const struct iovec *iov, int iovcnt,
         * were already connected. (TODO) */
        if (remote) {
                p = (uint8_t*)hdrs;
+               remote->sin_family = AF_INET;
                remote->sin_addr.s_addr = plan9addr_to_naddr(p);
                p += 16;
                p += 16;        /* skip local addr */