summaryrefslogtreecommitdiffstats
path: root/lib/compiler.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/compiler.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/compiler.h b/lib/compiler.h
index 0326105..9d39026 100644
--- a/lib/compiler.h
+++ b/lib/compiler.h
@@ -455,6 +455,12 @@ _Static_assert(sizeof(_uint64_t) == 8 && sizeof(_int64_t) == 8,
#define unlikely(_x) !!(_x)
#endif
+#ifdef __MACH__
+#define _DATA_SECTION(name) __attribute__((section("__DATA," name)))
+#else
+#define _DATA_SECTION(name) __attribute__((section(".data." name)))
+#endif
+
#ifdef __cplusplus
}
#endif