Fix Illumos/Solaris platform support (#5972)

This commit is contained in:
Thomas Strömberg 2026-02-27 00:01:40 -05:00 committed by GitHub
parent f319ce1dff
commit a65be1e6cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 29 additions and 1 deletions

View file

@ -138,6 +138,10 @@ static int rz_debug_native_bp(RzBreakpoint *bp, RzBreakpointItem *b, bool set) {
return -1;
}
RZ_API ut64 rz_debug_get_tls(RZ_NONNULL RzDebug *dbg, int tid) {
return 0;
}
RzDebugPlugin rz_debug_plugin_native = {
.name = "native",
.license = "LGPL3",

View file

@ -103,6 +103,14 @@ rz_io_deps = [
platform_deps,
]
if host_machine.system() == 'sunos'
rz_io_deps += [
cc.find_library('socket'),
cc.find_library('nsl'),
cc.find_library('proc'),
]
endif
if get_option('use_gpl')
rz_io_deps += dependency('rzqnx')
rz_io_sources += 'p/io_qnx.c'

View file

@ -21,6 +21,13 @@ if host_machine.system() == 'haiku'
]
endif
if host_machine.system() == 'sunos'
dependencies += [
cc.find_library('socket'),
cc.find_library('nsl')
]
endif
rz_socket = library('rz_socket', rz_socket_sources,
include_directories: [platform_inc],
dependencies: dependencies,

View file

@ -55,7 +55,7 @@
#include <mach/thread_policy.h>
#endif
#if __APPLE__ || __NetBSD__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__ || __sun
#if __APPLE__ || __NetBSD__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__
#include <sys/param.h>
#include <sys/sysctl.h>
#endif

View file

@ -303,6 +303,8 @@ RZ_API char *rz_asctime_r(RZ_NONNULL const struct tm *tm, RZ_NONNULL char *buf)
#if __WINDOWS__
errno_t err = asctime_s(buf, ASCTIME_BUF_MINLEN, tm);
return err ? NULL : buf;
#elif __sun
return asctime_r(tm, buf, ASCTIME_BUF_MINLEN);
#else
return asctime_r(tm, buf);
#endif
@ -313,6 +315,8 @@ RZ_API char *rz_ctime_r(RZ_NONNULL const time_t *timer, RZ_NONNULL char *buf) {
#if __WINDOWS__
errno_t err = ctime_s(buf, ASCTIME_BUF_MINLEN, timer);
return err ? NULL : buf;
#elif __sun
return ctime_r(timer, buf, ASCTIME_BUF_MINLEN);
#else
return ctime_r(timer, buf);
#endif

View file

@ -31,6 +31,11 @@ if host_machine.system() == 'haiku'
librzwinkd_deps += [
cc.find_library('network')
]
elif host_machine.system() == 'sunos'
librzwinkd_deps += [
cc.find_library('socket'),
cc.find_library('nsl')
]
endif
librzwinkd = static_library('rzwinkd', winkd_files,