mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
SmartOS: detection/build to all Illumos
This commit is contained in:
parent
976d804f1a
commit
8fc54cec00
3 changed files with 11 additions and 10 deletions
|
@ -956,13 +956,14 @@ if (NOT LWS_HAVE_REALLOC)
|
|||
endif()
|
||||
|
||||
if (UNIX)
|
||||
execute_process(COMMAND uname -n OUTPUT_VARIABLE NODENAME)
|
||||
# Need to chomp the \n at end of output.
|
||||
string(REGEX REPLACE "[\n]+" "" NODENAME "${NODENAME}")
|
||||
|
||||
if( NODENAME STREQUAL "smartos" )
|
||||
add_definitions( "-D__smartos__" )
|
||||
set(SMARTOS 1)
|
||||
execute_process( COMMAND grep -c illumos /lib/ld.so.1
|
||||
OUTPUT_VARIABLE ILLUMOS ERROR_QUIET )
|
||||
# Chomp the \n at end of output.
|
||||
string(REGEX REPLACE "[\n]+" "" ILLUMOS "${ILLUMOS}")
|
||||
|
||||
if(NOT ${ILLUMOS} MATCHES "0")
|
||||
add_definitions( "-D__illumos__" )
|
||||
set(ILLUMOS 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -1876,7 +1877,7 @@ if (UNIX)
|
|||
list(APPEND LIB_LIST m)
|
||||
endif()
|
||||
|
||||
if(SMARTOS)
|
||||
if(ILLUMOS)
|
||||
list(APPEND LIB_LIST socket)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ lws_dir(const char *dirpath, void *user, lws_dir_callback_function cb)
|
|||
* files are LDOT_UNKNOWN
|
||||
*/
|
||||
|
||||
#if defined(__smartos__)
|
||||
#if defined(__illumos__)
|
||||
struct stat s;
|
||||
stat(namelist[i]->d_name, &s);
|
||||
switch (s.st_mode) {
|
||||
|
|
|
@ -171,6 +171,6 @@ delete_from_fd(const struct lws_context *context, int fd);
|
|||
* Solaris 11.X only supports POSIX 2001, MSG_NOSIGNAL appears in
|
||||
* POSIX 2008.
|
||||
*/
|
||||
#if defined(__sun) && !defined(__smartos__)
|
||||
#if defined(__sun) && !defined(__illumos__)
|
||||
#define MSG_NOSIGNAL 0
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue