Skip to content

Commit a65be1e

Browse files
authored
Fix Illumos/Solaris platform support (#5972)
1 parent f319ce1 commit a65be1e

File tree

6 files changed

+29
-1
lines changed

6 files changed

+29
-1
lines changed

librz/debug/p/native/unsupported.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ static int rz_debug_native_bp(RzBreakpoint *bp, RzBreakpointItem *b, bool set) {
138138
return -1;
139139
}
140140

141+
RZ_API ut64 rz_debug_get_tls(RZ_NONNULL RzDebug *dbg, int tid) {
142+
return 0;
143+
}
144+
141145
RzDebugPlugin rz_debug_plugin_native = {
142146
.name = "native",
143147
.license = "LGPL3",

librz/io/meson.build

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,14 @@ rz_io_deps = [
103103
platform_deps,
104104
]
105105

106+
if host_machine.system() == 'sunos'
107+
rz_io_deps += [
108+
cc.find_library('socket'),
109+
cc.find_library('nsl'),
110+
cc.find_library('proc'),
111+
]
112+
endif
113+
106114
if get_option('use_gpl')
107115
rz_io_deps += dependency('rzqnx')
108116
rz_io_sources += 'p/io_qnx.c'

librz/socket/meson.build

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ if host_machine.system() == 'haiku'
2121
]
2222
endif
2323

24+
if host_machine.system() == 'sunos'
25+
dependencies += [
26+
cc.find_library('socket'),
27+
cc.find_library('nsl')
28+
]
29+
endif
30+
2431
rz_socket = library('rz_socket', rz_socket_sources,
2532
include_directories: [platform_inc],
2633
dependencies: dependencies,

librz/util/thread.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#include <mach/thread_policy.h>
5656
#endif
5757

58-
#if __APPLE__ || __NetBSD__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__ || __sun
58+
#if __APPLE__ || __NetBSD__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__
5959
#include <sys/param.h>
6060
#include <sys/sysctl.h>
6161
#endif

librz/util/time.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ RZ_API char *rz_asctime_r(RZ_NONNULL const struct tm *tm, RZ_NONNULL char *buf)
303303
#if __WINDOWS__
304304
errno_t err = asctime_s(buf, ASCTIME_BUF_MINLEN, tm);
305305
return err ? NULL : buf;
306+
#elif __sun
307+
return asctime_r(tm, buf, ASCTIME_BUF_MINLEN);
306308
#else
307309
return asctime_r(tm, buf);
308310
#endif
@@ -313,6 +315,8 @@ RZ_API char *rz_ctime_r(RZ_NONNULL const time_t *timer, RZ_NONNULL char *buf) {
313315
#if __WINDOWS__
314316
errno_t err = ctime_s(buf, ASCTIME_BUF_MINLEN, timer);
315317
return err ? NULL : buf;
318+
#elif __sun
319+
return ctime_r(timer, buf, ASCTIME_BUF_MINLEN);
316320
#else
317321
return ctime_r(timer, buf);
318322
#endif

subprojects/rzwinkd/meson.build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ if host_machine.system() == 'haiku'
3131
librzwinkd_deps += [
3232
cc.find_library('network')
3333
]
34+
elif host_machine.system() == 'sunos'
35+
librzwinkd_deps += [
36+
cc.find_library('socket'),
37+
cc.find_library('nsl')
38+
]
3439
endif
3540

3641
librzwinkd = static_library('rzwinkd', winkd_files,

0 commit comments

Comments
 (0)