summary refs log tree commit diff stats
path: root/lib/nimbase.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/nimbase.h')
-rw-r--r--lib/nimbase.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/nimbase.h b/lib/nimbase.h
index fb6861ec7..732d3975f 100644
--- a/lib/nimbase.h
+++ b/lib/nimbase.h
@@ -256,7 +256,6 @@ __clang__
 
 #include <limits.h>
 #include <stddef.h>
-#include <stdalign.h>
 
 /* C99 compiler? */
 #if (defined(__STD_VERSION__) && (__STD_VERSION__ >= 199901))
@@ -467,6 +466,12 @@ typedef int Nim_and_C_compiler_disagree_on_target_architecture[sizeof(NI) == siz
 #  define NIM_EXTERNC
 #endif
 
+#if defined(_MSC_VER)
+#  define NIM_ALIGN(x)  __declspec(align(x))
+#else
+#  define NIM_ALIGN(x)  __attribute__((aligned(x)))
+#endif
+
 /* ---------------- platform specific includes ----------------------- */
 
 /* VxWorks related includes */