projects
/
platform
/
upstream
/
libwebsockets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ff04bb
)
Build fixes for WindowsCE
author
Patrick Gansterer
<paroga@paroga.com>
Fri, 28 Mar 2014 17:09:20 +0000
(18:09 +0100)
committer
Andy Green
<andy.green@linaro.org>
Sat, 29 Mar 2014 01:54:05 +0000
(09:54 +0800)
lib/libwebsockets.c
patch
|
blob
|
history
diff --git
a/lib/libwebsockets.c
b/lib/libwebsockets.c
index
fbc0fae
..
b7d84b8
100644
(file)
--- a/
lib/libwebsockets.c
+++ b/
lib/libwebsockets.c
@@
-2579,6
+2579,8
@@
libwebsocket_create_context(struct lws_context_creation_info *info)
if (info->port != CONTEXT_PORT_NO_LISTEN) {
int sockfd;
+ struct sockaddr_in sin;
+ socklen_t len = sizeof(sin);
#ifdef LWS_USE_IPV6
if (LWS_IPV6_ENABLED(context))
@@
-2637,10
+2639,8
@@
libwebsocket_create_context(struct lws_context_creation_info *info)
goto bail;
}
- struct sockaddr_in sin;
- socklen_t len = sizeof(sin);
if (getsockname(sockfd, (struct sockaddr *)&sin, &len) == -1)
-
perror("getsockname"
);
+
lwsl_warn("getsockname: %s\n", strerror(LWS_ERRNO)
);
else
info->port = ntohs(sin.sin_port);