From cce6838e1648267b60d612a479e71cfbe5ff523f Mon Sep 17 00:00:00 2001
From: Bill Currie <bill@taniwha.org>
Date: Tue, 1 Mar 2011 10:56:03 +0900
Subject: [PATCH] Ensure .ctor is declared static.

---
 tools/qfcc/source/class.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/qfcc/source/class.c b/tools/qfcc/source/class.c
index 38286f5bf..dab08ecdd 100644
--- a/tools/qfcc/source/class.c
+++ b/tools/qfcc/source/class.c
@@ -1134,6 +1134,7 @@ class_finish_module (void)
 	symbol_t   *exec_class_sym;
 	symbol_t   *init_sym;
 	expr_t     *init_expr;
+	storage_class_t save_storage;
 
 	data.refs = emit_selectors ();
 	if (class_hash) {
@@ -1185,9 +1186,12 @@ class_finish_module (void)
 								 address_expr (new_symbol_expr (module_sym),
 									 		   0, 0)));
 
+	save_storage = current_storage;
+	current_storage = st_static;
 	current_func = begin_function (init_sym, 0, current_symtab, 1);
 	build_code_function (init_sym, 0, init_expr);;
 	current_func = 0;
+	current_storage = save_storage;
 }
 
 protocol_t *