diff options
Diffstat (limited to 'nuttx/net/getsockname.c')
-rw-r--r-- | nuttx/net/getsockname.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nuttx/net/getsockname.c b/nuttx/net/getsockname.c index 6706e5e1e..35551ccf3 100644 --- a/nuttx/net/getsockname.c +++ b/nuttx/net/getsockname.c @@ -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; @@ -202,6 +203,7 @@ int getsockname(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen) outaddr->sin_addr.s_addr = dev->d_ipaddr; *addrlen = sizeof(struct sockaddr_in); #endif +#endif netdev_semgive(); /* Return success */ |