1 --- a/applets/applet_tables.c
2 +++ b/applets/applet_tables.c
3 @@ -80,8 +80,15 @@ int main(int argc, char **argv)
5 printf("#define NUM_APPLETS %u\n", NUM_APPLETS);
6 if (NUM_APPLETS == 1) {
7 + char *dash_to_underscore, *p;
8 printf("#define SINGLE_APPLET_STR \"%s\"\n", applets[0].name);
9 - printf("#define SINGLE_APPLET_MAIN %s_main\n", applets[0].name);
10 + /* Example: "ether-wake" -> "ether_wake" */
11 + p = dash_to_underscore = strdup(applets[0].name);
16 + printf("#define SINGLE_APPLET_MAIN %s_main\n", dash_to_underscore);