From: Gunnar Beutner Date: Sun, 28 Aug 2016 12:33:42 +0000 (+0200) Subject: Make GCC 4.6 happy X-Git-Tag: v2.6.0~172 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=72e4e4faccc5b87ee88c13c05cd6234a836a6653;p=icinga2 Make GCC 4.6 happy refs #12576 --- diff --git a/tools/mkembedconfig/mkembedconfig.c b/tools/mkembedconfig/mkembedconfig.c index 0050bc7e7..b595a6bca 100644 --- a/tools/mkembedconfig/mkembedconfig.c +++ b/tools/mkembedconfig/mkembedconfig.c @@ -47,7 +47,7 @@ int main(int argc, char **argv) fprintf(outfp, "/* This file has been automatically generated\n" " from the input file \"%s\". */\n\n", argv[1]); - fprintf(outfp, "#include \"config/configfragment.hpp\"\n\nREGISTER_CONFIG_FRAGMENT(\"%s\", R\"CONFIG_FRAGMENT(\n", argv[1]); + fputs("#include \"config/configfragment.hpp\"\n\nnamespace {\n\nconst char *fragment = R\"CONFIG_FRAGMENT(", outfp); while (!feof(infp)) { char buf[1024]; @@ -59,7 +59,7 @@ int main(int argc, char **argv) fwrite(buf, rc, 1, outfp); } - fputs(")CONFIG_FRAGMENT\");", outfp); + fprintf(outfp, ")CONFIG_FRAGMENT\";\n\nREGISTER_CONFIG_FRAGMENT(\"%s\", fragment);\n\n}", argv[1]); fclose(outfp); fclose(infp);