aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/zig.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/zig.h b/lib/zig.h
index c188b6e5c7..032ad30053 100644
--- a/lib/zig.h
+++ b/lib/zig.h
@@ -203,7 +203,11 @@ typedef char bool;
__pragma(comment(linker, "/alternatename:_" #symbol "=_" #name ))
#endif /*_M_X64 */
#else
+#if __APPLE__
+#define zig_import(sig, symbol, name) zig_extern sig __asm("_" #name);
+#else /* __APPLE__ */
#define zig_import(sig, symbol, name) zig_extern sig __asm(#name);
+#endif /* __APPLE__ */
#endif
#define zig_expand_import(sig, symbol, name) zig_import(sig, symbol, name)