diff options
Diffstat (limited to 'decls_cgen.c')
-rw-r--r-- | decls_cgen.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/decls_cgen.c b/decls_cgen.c index 331d179..5a85b09 100644 --- a/decls_cgen.c +++ b/decls_cgen.c @@ -253,6 +253,7 @@ static void cgen_fn_decl(CGenerator *g, FnExpr *f, Type *t) { if (ctypes[0].kind == CTYPE_NONE) cgen_type_post(g, &fn_types[0]); cgen_write(g, ";"); + if (!f->c.name || !ident_eq_str(f->c.name, foreign_name) || g->nms != NULL) { cgen_write(g, "static "); if (ctypes[0].kind == CTYPE_NONE) { |