1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00

wince minor adaptations

After Ondraco

https://github.com/warmcat/libwebsockets/issues/444

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2016-02-29 18:48:55 +08:00
parent 72c854e022
commit bcd21bf190
3 changed files with 15 additions and 0 deletions

View file

@ -987,11 +987,13 @@ lwsl_timestamp(int level, char *p, int len)
#endif
int n;
#ifndef _WIN32_WCE
#ifdef WIN32
ptm = localtime(&o_now);
#else
if (localtime_r(&o_now, &tm))
ptm = &tm;
#endif
#endif
p[0] = '\0';
for (n = 0; n < LLL_COUNT; n++) {

View file

@ -114,9 +114,18 @@ struct sockaddr_in;
#include <stddef.h>
#include <stdint.h>
#include <basetsd.h>
#ifndef _WIN32_WCE
#include <fcntl.h>
#else
#define _O_RDONLY 0x0000
#define O_RDONLY _O_RDONLY
#endif
#ifdef _WIN32_WCE
#define strcasecmp _stricmp
#else
#define strcasecmp stricmp
#endif
#define getdtablesize() 30000
#define LWS_INLINE __inline

View file

@ -291,7 +291,11 @@ lws_plat_set_socket_options(struct lws_context *context, lws_sockfd_type fd)
/* Disable Nagle */
optval = 1;
#ifndef _WIN32_WCE
tcp_proto = getprotobyname("TCP");
#else
tcp_proto = 6;
#endif
if (!tcp_proto) {
lwsl_err("getprotobyname() failed with error %d\n", LWS_ERRNO);
return 1;