Index: gcc/c-family/c-common.h
--- gcc/c-family/c-common.h.orig
+++ gcc/c-family/c-common.h
@@ -846,7 +846,7 @@ extern tree c_linkage_bindings (tree);
 extern void record_builtin_type (enum rid, const char *, tree);
 extern void start_fname_decls (void);
 extern void finish_fname_decls (void);
-extern const char *fname_as_string (int);
+extern "C" const char *fname_as_string (int);
 extern tree fname_decl (location_t, unsigned, tree);
 
 extern int check_user_alignment (const_tree, bool, bool);
