mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
qnx: add support
https://libwebsockets.org/pipermail/libwebsockets/2018-January/003600.html
This commit is contained in:
parent
a903d73ab7
commit
08d36dbe43
8 changed files with 20 additions and 8 deletions
|
@ -1222,6 +1222,10 @@ elseif (WIN32)
|
|||
list(APPEND LIB_LIST ws2_32.lib userenv.lib psapi.lib iphlpapi.lib)
|
||||
endif()
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "QNX")
|
||||
list(APPEND LIB_LIST socket)
|
||||
endif()
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND LIB_LIST m)
|
||||
endif()
|
||||
|
@ -1453,7 +1457,7 @@ if (NOT LWS_WITHOUT_TESTAPPS)
|
|||
|
||||
if (UNIX AND LWS_WITH_PLUGINS)
|
||||
set(CMAKE_C_FLAGS "-fPIC ${CMAKE_C_FLAGS}")
|
||||
if(NOT(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD"))
|
||||
if(NOT((${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") OR (${CMAKE_SYSTEM_NAME} MATCHES "QNX")))
|
||||
target_link_libraries(websockets dl)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -2270,7 +2270,7 @@ lws_parse_uri(char *p, const char **prot, const char **ads, int *port,
|
|||
* extensions disabled.
|
||||
*/
|
||||
|
||||
int
|
||||
LWS_VISIBLE int
|
||||
lws_extension_callback_pm_deflate(struct lws_context *context,
|
||||
const struct lws_extension *ext,
|
||||
struct lws *wsi,
|
||||
|
|
|
@ -113,7 +113,7 @@ typedef unsigned long long lws_intptr_t;
|
|||
#include <sys/capability.h>
|
||||
#endif
|
||||
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__QNX__)
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -70,6 +70,13 @@ lws_plat_pipe_close(struct lws *wsi)
|
|||
pt->dummy_pipe_fds[0] = pt->dummy_pipe_fds[1] = -1;
|
||||
}
|
||||
|
||||
#ifdef __QNX__
|
||||
# include "netinet/tcp_var.h"
|
||||
# define TCP_KEEPINTVL TCPCTL_KEEPINTVL
|
||||
# define TCP_KEEPIDLE TCPCTL_KEEPIDLE
|
||||
# define TCP_KEEPCNT TCPCTL_KEEPCNT
|
||||
#endif
|
||||
|
||||
unsigned long long time_in_microseconds(void)
|
||||
{
|
||||
struct timeval tv;
|
||||
|
@ -344,7 +351,7 @@ lws_plat_set_socket_options(struct lws_vhost *vhost, int fd)
|
|||
|
||||
/* Disable Nagle */
|
||||
optval = 1;
|
||||
#if defined (__sun)
|
||||
#if defined (__sun) || defined(__QNX__)
|
||||
if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (const void *)&optval, optlen) < 0)
|
||||
return 1;
|
||||
#elif !defined(__APPLE__) && \
|
||||
|
|
|
@ -152,7 +152,7 @@ int fork(void);
|
|||
#if defined (__ANDROID__)
|
||||
#include <syslog.h>
|
||||
#include <sys/resource.h>
|
||||
#elif defined (__sun) || defined(__HAIKU__)
|
||||
#elif defined (__sun) || defined(__HAIKU__) || defined(__QNX__)
|
||||
#include <syslog.h>
|
||||
#else
|
||||
#if !defined(LWS_WITH_ESP32)
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
#define LWS_INTERNAL
|
||||
#include "../lib/libwebsockets.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <uv.h>
|
||||
|
||||
struct fobj {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "../lib/libwebsockets.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -32,7 +33,6 @@
|
|||
#include <io.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
struct per_session_data__post_demo {
|
||||
struct lws_spa *spa;
|
||||
|
|
|
@ -22,9 +22,10 @@
|
|||
#include <string.h>
|
||||
#include <getopt.h>
|
||||
#ifndef WIN32
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <syslog.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
/* windows has no SIGUSR1 */
|
||||
#if !defined(WIN32) && !defined(_WIN32)
|
||||
|
|
Loading…
Add table
Reference in a new issue