From 5651257fffc4482861c2ed6a67721fd00f0da6c0 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 21 Feb 2017 19:44:19 -0500 Subject: libuv: automatically skip ifaddrs on Solaris 10 --- Utilities/cmlibuv/src/unix/sunos.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Utilities/cmlibuv/src/unix/sunos.c b/Utilities/cmlibuv/src/unix/sunos.c index a43f7f1..14c58af 100644 --- a/Utilities/cmlibuv/src/unix/sunos.c +++ b/Utilities/cmlibuv/src/unix/sunos.c @@ -28,6 +28,10 @@ #include #include +#if !defined(SUNOS_NO_IFADDRS) && _XOPEN_SOURCE < 600 +#define SUNOS_NO_IFADDRS +#endif + #ifndef SUNOS_NO_IFADDRS # include #endif -- cgit v0.12 From f06986926ae2ed76023956e6594711f9e65b4106 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 21 Feb 2017 19:44:53 -0500 Subject: libuv: Implement mkdtemp on Solaris 10 --- Utilities/cmlibuv/src/unix/fs.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Utilities/cmlibuv/src/unix/fs.c b/Utilities/cmlibuv/src/unix/fs.c index f9513ea..8a4ba7a 100644 --- a/Utilities/cmlibuv/src/unix/fs.c +++ b/Utilities/cmlibuv/src/unix/fs.c @@ -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; } -- cgit v0.12 From c9b3c5625a4b35235bfe19e95db8e7d0dfbde59c Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 21 Feb 2017 19:45:14 -0500 Subject: libuv: Link to 'rt' library on Solaris 10 to get semaphores --- Utilities/cmlibuv/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Utilities/cmlibuv/CMakeLists.txt b/Utilities/cmlibuv/CMakeLists.txt index a8e25ba..1899f83 100644 --- a/Utilities/cmlibuv/CMakeLists.txt +++ b/Utilities/cmlibuv/CMakeLists.txt @@ -212,6 +212,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS") nsl sendfile socket + rt ) list(APPEND uv_headers include/uv-sunos.h -- cgit v0.12 From e4ac7c2b4f9523330c4811ff03da69e334665f98 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 27 Feb 2017 09:37:39 -0500 Subject: libuv: Compile as C 90 on Solaris 10 --- Utilities/cmlibuv/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Utilities/cmlibuv/CMakeLists.txt b/Utilities/cmlibuv/CMakeLists.txt index 1899f83..6632a1e 100644 --- a/Utilities/cmlibuv/CMakeLists.txt +++ b/Utilities/cmlibuv/CMakeLists.txt @@ -224,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 -- cgit v0.12 From a333570914ffb9756c94c31afdbc4a8429e8eaa7 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 21 Feb 2017 19:45:48 -0500 Subject: Enable libuv on Solaris 10 We've ported our libuv to this platform so we can build it now. --- CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e613224..472c6ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) -- cgit v0.12