diff --git a/libtcc.c b/libtcc.c index df98bb0..2b48d8f 100644 --- a/libtcc.c +++ b/libtcc.c @@ -1138,6 +1138,11 @@ LIBTCCAPI TCCState *tcc_new(void) tcc_define_symbol(s, "__FreeBSD_kernel__", NULL); # endif #endif +# if defined(__NetBSD__) +# define str(s) #s + tcc_define_symbol(s, "__NetBSD__", str( __NetBSD__)); +# undef str +# endif /* TinyCC & gcc defines */ #if defined TCC_TARGET_PE && defined TCC_TARGET_X86_64