Skip to content
Snippets Groups Projects
Commit 09a81e29 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'libuv-solaris-10'

a3335709 Enable libuv on Solaris 10
e4ac7c2b libuv: Compile as C 90 on Solaris 10
c9b3c562 libuv: Link to 'rt' library on Solaris 10 to get semaphores
f0698692 libuv: Implement mkdtemp on Solaris 10
5651257f libuv: automatically skip ifaddrs on Solaris 10
parents fd6b260c a3335709
No related branches found
No related tags found
No related merge requests found
......@@ -509,12 +509,6 @@ int main(void) { return 0; }
elseif(CMAKE_SYSTEM_NAME STREQUAL "HP-UX")
# Disable until it can be ported.
set(CMAKE_USE_LIBUV 0)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "sparc")
# Disable until it can be ported.
set(CMAKE_USE_LIBUV 0)
elseif(CMAKE_SYSTEM STREQUAL "SunOS-5.10")
# Disable until it can be ported.
set(CMAKE_USE_LIBUV 0)
endif()
endif()
if(CMAKE_USE_LIBUV)
......
......@@ -212,6 +212,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
nsl
sendfile
socket
rt
)
list(APPEND uv_headers
include/uv-sunos.h
......@@ -223,6 +224,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
list(APPEND uv_defines
_XOPEN_SOURCE=500
)
if(CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 90)
endif()
else()
list(APPEND uv_defines
_XOPEN_SOURCE=600
......
......@@ -244,9 +244,19 @@ skip:
#endif
}
#if defined(__sun) && _XOPEN_SOURCE < 600
static char* uv__mkdtemp(char *template)
{
if (!mktemp(template) || mkdir(template, 0700))
return NULL;
return template;
}
#else
#define uv__mkdtemp mkdtemp
#endif
static ssize_t uv__fs_mkdtemp(uv_fs_t* req) {
return mkdtemp((char*) req->path) ? 0 : -1;
return uv__mkdtemp((char*) req->path) ? 0 : -1;
}
......
......@@ -28,6 +28,10 @@
#include <assert.h>
#include <errno.h>
#if !defined(SUNOS_NO_IFADDRS) && _XOPEN_SOURCE < 600
#define SUNOS_NO_IFADDRS
#endif
#ifndef SUNOS_NO_IFADDRS
# include <ifaddrs.h>
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment