--- a/src/runtime/x86-assem.S
+++ b/src/runtime/x86-assem.S
@@ -23,15 +23,15 @@
 #include "genesis/thread.h"
 	
 /* Minimize conditionalization for different OS naming schemes. */
-#if defined __linux__  || defined __FreeBSD__ /* (but *not* OpenBSD) */
+#if defined __linux__  || defined __FreeBSD__ || defined __NetBSD__ /* (but *not* OpenBSD) */
 #define GNAME(var) var
 #else
 #define GNAME(var) _##var
 #endif
 
-/* Get the right type of alignment. Linux and FreeBSD (but not OpenBSD)
+/* Get the right type of alignment. Linux, FreeBSD and NetBSD (but not OpenBSD)
  * want alignment in bytes. */
-#if defined(__linux__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
 #define align_4byte	4
 #define align_8byte	8
 #define align_16byte	16