source: trunk/package/busybox/patches/000-upstream-buildsys.patch @ 28513

Last change on this file since 28513 was 28513, checked in by nico, 5 years ago

[package] busybox: update to 1.19.2 (thanks to Peter Wagner)

File size: 608 bytes
  • applets/applet_tables.c

    a b int main(int argc, char **argv) 
    8080 
    8181        printf("#define NUM_APPLETS %u\n", NUM_APPLETS); 
    8282        if (NUM_APPLETS == 1) { 
     83                char *dash_to_underscore, *p; 
    8384                printf("#define SINGLE_APPLET_STR \"%s\"\n", applets[0].name); 
    84                 printf("#define SINGLE_APPLET_MAIN %s_main\n", applets[0].name); 
     85                /* Example: "ether-wake" -> "ether_wake" */ 
     86                p = dash_to_underscore = strdup(applets[0].name); 
     87                p--; 
     88                while (*++p) 
     89                        if (*p == '-') 
     90                                *p = '_'; 
     91                printf("#define SINGLE_APPLET_MAIN %s_main\n", dash_to_underscore); 
    8592        } 
    8693        printf("\n"); 
    8794 
Note: See TracBrowser for help on using the repository browser.