Magellan Linux

Annotation of /trunk/busybox/patches/busybox-1.19.2-buildsys.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1541 - (hide annotations) (download)
Mon Sep 26 15:52:03 2011 UTC (12 years, 8 months ago) by niro
File size: 643 byte(s)
-added upstream patches
1 niro 1541 --- busybox-1.19.2/applets/applet_tables.c
2     +++ busybox-1.19.2-buildsys/applets/applet_tables.c
3     @@ -80,8 +80,15 @@ int main(int argc, char **argv)
4    
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);
12     + p--;
13     + while (*++p)
14     + if (*p == '-')
15     + *p = '_';
16     + printf("#define SINGLE_APPLET_MAIN %s_main\n", dash_to_underscore);
17     }
18     printf("\n");
19