summaryrefslogtreecommitdiff
path: root/core/src/xmake/engine.c
diff options
context:
space:
mode:
authorruki <[email protected]>2025-11-22 23:49:58 +0800
committerruki <[email protected]>2025-11-22 23:49:58 +0800
commit6b615cab4b49ac08420a4bdfb411ff4308646b15 (patch)
treef83f0abbcb73973dccc7f357785250e5ce7c430b /core/src/xmake/engine.c
parent4a3e993297b57f6c725690b26a81ecf5ad9c087e (diff)
add solaris platform
Diffstat (limited to 'core/src/xmake/engine.c')
-rw-r--r--core/src/xmake/engine.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/src/xmake/engine.c b/core/src/xmake/engine.c
index 6360bf978..d71c05c62 100644
--- a/core/src/xmake/engine.c
+++ b/core/src/xmake/engine.c
@@ -39,7 +39,7 @@
#include <mach-o/dyld.h>
#include <signal.h>
#elif defined(TB_CONFIG_OS_LINUX) || defined(TB_CONFIG_OS_BSD) || defined(TB_CONFIG_OS_ANDROID) || \
- defined(TB_CONFIG_OS_HAIKU)
+ defined(TB_CONFIG_OS_HAIKU) || defined(TB_CONFIG_OS_SOLARIS)
#include <unistd.h>
#include <signal.h>
#endif
@@ -48,6 +48,10 @@
#include <sys/sysctl.h>
#include <signal.h>
#endif
+#ifdef TB_CONFIG_OS_SOLARIS
+#include <sys/types.h>
+#include <signal.h>
+#endif
#ifdef TB_CONFIG_OS_HAIKU
#include <image.h>
#endif
@@ -79,6 +83,8 @@
#else
#define XM_PROC_SELF_FILE "/proc/curproc/file"
#endif
+#elif defined(TB_CONFIG_OS_SOLARIS)
+#define XM_PROC_SELF_FILE "/proc/self/path/a.out"
#endif
// hook lua memory allocator
@@ -1079,6 +1085,8 @@ static tb_void_t xm_engine_init_host(xm_engine_t *engine) {
syshost = "linux";
#elif defined(TB_CONFIG_OS_BSD)
syshost = "bsd";
+#elif defined(TB_CONFIG_OS_SOLARIS)
+ syshost = "solaris";
#elif defined(TB_CONFIG_OS_IOS)
syshost = "ios";
#elif defined(TB_CONFIG_OS_ANDROID)