mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Update PIC32 Ethernet driver from debugging (still does not work
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4465 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -192,6 +192,7 @@ int getsockname(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen)
|
||||
|
||||
/* Set the address family and the IP address */
|
||||
|
||||
#if defined(CONFIG_NET_TCP) || defined(CONFIG_NET_UDP)
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
#error "Not big enough for IPv6 address"
|
||||
outaddr->sin_family = AF_INET6;
|
||||
@@ -201,6 +202,7 @@ int getsockname(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen)
|
||||
outaddr->sin_family = AF_INET;
|
||||
outaddr->sin_addr.s_addr = dev->d_ipaddr;
|
||||
*addrlen = sizeof(struct sockaddr_in);
|
||||
#endif
|
||||
#endif
|
||||
netdev_semgive();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user