From 10983653c6fb850866cfc67adfcd7a91b47b0abc Mon Sep 17 00:00:00 2001 From: Leroy Hopson Date: Tue, 20 Jul 2021 07:18:32 +0700 Subject: [PATCH] Fix macOS builds --- addons/godot_xterm/native/src/libgodotxtermnative.cpp | 4 ++-- addons/godot_xterm/native/src/terminal.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/godot_xterm/native/src/libgodotxtermnative.cpp b/addons/godot_xterm/native/src/libgodotxtermnative.cpp index 7d249c2..b862263 100644 --- a/addons/godot_xterm/native/src/libgodotxtermnative.cpp +++ b/addons/godot_xterm/native/src/libgodotxtermnative.cpp @@ -3,7 +3,7 @@ #if !defined(_PTY_DISABLED) #include "libuv_utils.h" #include "pipe.h" -#if defined(__unix__) +#if defined(__linux__) || defined(__APPLE__) #include "node_pty/unix/pty.h" #endif #if defined(__WIN32) @@ -26,7 +26,7 @@ extern "C" void GDN_EXPORT godot_nativescript_init(void *handle) { #if !defined(_PTY_DISABLED) godot::register_tool_class(); godot::register_tool_class(); -#if defined(__unix__) +#if defined(__linux__) || defined(__APPLE__) godot::register_tool_class(); #endif #if defined(__WIN32) diff --git a/addons/godot_xterm/native/src/terminal.cpp b/addons/godot_xterm/native/src/terminal.cpp index ca1b352..db6ad3e 100644 --- a/addons/godot_xterm/native/src/terminal.cpp +++ b/addons/godot_xterm/native/src/terminal.cpp @@ -11,7 +11,7 @@ #include // For _populate_key_list(), see below. -#if !defined(__EMSCRIPTEN__) +#if !defined(__EMSCRIPTEN__) && !defined(__APPLE__) #include #endif @@ -26,7 +26,7 @@ void Terminal::_populate_key_list() { // GlobalConstants from the header: abort(Assertion failed: bad export type for // `_ZN5godot15GlobalConstants8KEY_KP_0E`: undefined). Build with -s // ASSERTIONS=1 for more info. -#if !defined(__EMSCRIPTEN__) +#if !defined(__EMSCRIPTEN__) && !defined(__APPLE__) #define GLOBAL_CONSTANT(VAR) GlobalConstants::VAR #else #define GLOBAL_CONSTANT(VAR) get_constant(#VAR) @@ -650,4 +650,4 @@ String Terminal::copy_all() { String result = String(out); std::free(out); return result; -} \ No newline at end of file +}