mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
Subject: Haiku: initial platform support
https://github.com/warmcat/libwebsockets/pull/1033
This commit is contained in:
parent
495342c2ae
commit
8bea6c144e
3 changed files with 18 additions and 4 deletions
|
@ -497,6 +497,10 @@ if (LWS_WITHOUT_BUILTIN_SHA1)
|
|||
set(LWS_SHA1_USE_OPENSSL_NAME 1)
|
||||
endif()
|
||||
|
||||
if (HAIKU)
|
||||
set(CMAKE_REQUIRED_LIBRARIES network)
|
||||
endif()
|
||||
|
||||
CHECK_FUNCTION_EXISTS(bzero LWS_HAVE_BZERO)
|
||||
CHECK_FUNCTION_EXISTS(fork LWS_HAVE_FORK)
|
||||
CHECK_FUNCTION_EXISTS(getenv LWS_HAVE_GETENV)
|
||||
|
@ -1129,6 +1133,10 @@ if (UNIX)
|
|||
list(APPEND LIB_LIST m)
|
||||
endif()
|
||||
|
||||
if (HAIKU)
|
||||
list(APPEND LIB_LIST network)
|
||||
endif()
|
||||
|
||||
if (LWS_HAVE_LIBCAP)
|
||||
list(APPEND LIB_LIST cap )
|
||||
endif()
|
||||
|
|
|
@ -233,7 +233,8 @@ lws_plat_set_socket_options(struct lws_vhost *vhost, int fd)
|
|||
#if defined(__APPLE__) || \
|
||||
defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
|
||||
defined(__NetBSD__) || \
|
||||
defined(__OpenBSD__)
|
||||
defined(__OpenBSD__) || \
|
||||
defined(__HAIKU__)
|
||||
struct protoent *tcp_proto;
|
||||
#endif
|
||||
|
||||
|
@ -247,7 +248,8 @@ lws_plat_set_socket_options(struct lws_vhost *vhost, int fd)
|
|||
#if defined(__APPLE__) || \
|
||||
defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
|
||||
defined(__NetBSD__) || \
|
||||
defined(__CYGWIN__) || defined(__OpenBSD__) || defined (__sun)
|
||||
defined(__CYGWIN__) || defined(__OpenBSD__) || defined (__sun) || \
|
||||
defined(__HAIKU__)
|
||||
|
||||
/*
|
||||
* didn't find a way to set these per-socket, need to
|
||||
|
@ -291,7 +293,8 @@ lws_plat_set_socket_options(struct lws_vhost *vhost, int fd)
|
|||
#elif !defined(__APPLE__) && \
|
||||
!defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && \
|
||||
!defined(__NetBSD__) && \
|
||||
!defined(__OpenBSD__)
|
||||
!defined(__OpenBSD__) && \
|
||||
!defined(__HAIKU__)
|
||||
if (setsockopt(fd, SOL_TCP, TCP_NODELAY, (const void *)&optval, optlen) < 0)
|
||||
return 1;
|
||||
#else
|
||||
|
|
|
@ -190,13 +190,16 @@ int kill(int pid, int sig);
|
|||
#include <getifaddrs.h>
|
||||
#else
|
||||
#if !defined(LWS_WITH_ESP8266) && !defined(LWS_WITH_ESP32)
|
||||
#if defined(__HAIKU__)
|
||||
#define _BSD_SOURCE
|
||||
#endif
|
||||
#include <ifaddrs.h>
|
||||
#endif
|
||||
#endif
|
||||
#if defined (__ANDROID__)
|
||||
#include <syslog.h>
|
||||
#include <sys/resource.h>
|
||||
#elif defined (__sun)
|
||||
#elif defined (__sun) || defined(__HAIKU__)
|
||||
#include <syslog.h>
|
||||
#else
|
||||
#if !defined(LWS_WITH_ESP8266) && !defined(LWS_WITH_ESP32)
|
||||
|
|
Loading…
Add table
Reference in a new issue