diff --git a/librz/debug/p/native/unsupported.c b/librz/debug/p/native/unsupported.c index 0cedacc066..61f3f4f579 100644 --- a/librz/debug/p/native/unsupported.c +++ b/librz/debug/p/native/unsupported.c @@ -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", diff --git a/librz/io/meson.build b/librz/io/meson.build index 041f97f8a5..ec2dd7064f 100644 --- a/librz/io/meson.build +++ b/librz/io/meson.build @@ -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' diff --git a/librz/socket/meson.build b/librz/socket/meson.build index 970794a2e1..e97c9c5c32 100644 --- a/librz/socket/meson.build +++ b/librz/socket/meson.build @@ -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, diff --git a/librz/util/thread.h b/librz/util/thread.h index 2b2f23c05c..44b1160890 100644 --- a/librz/util/thread.h +++ b/librz/util/thread.h @@ -55,7 +55,7 @@ #include #endif -#if __APPLE__ || __NetBSD__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__ || __sun +#if __APPLE__ || __NetBSD__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__ #include #include #endif diff --git a/librz/util/time.c b/librz/util/time.c index 9433fb85c0..e5b230c2b9 100644 --- a/librz/util/time.c +++ b/librz/util/time.c @@ -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 diff --git a/subprojects/rzwinkd/meson.build b/subprojects/rzwinkd/meson.build index fcec9be660..e7a7c8e535 100644 --- a/subprojects/rzwinkd/meson.build +++ b/subprojects/rzwinkd/meson.build @@ -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,