--- misc-utils/findfs.c 2009-07-03 23:20:01 +0000 +++ misc-utils.uclibc/findfs.c 2009-11-22 15:52:41 +0000 @@ -14,6 +14,10 @@ #include "nls.h" +#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 +static const char *program_invocation_short_name; +#endif + static void __attribute__((__noreturn__)) usage(int rc) { const char *p = program_invocation_short_name; @@ -33,6 +37,12 @@ bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); +#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 + char *program_invocation_short_name; + program_invocation_short_name = strrchr( argv[0], '/' ); + program_invocation_short_name = (program_invocation_short_name) ? program_invocation_short_name +1 : argv[0]; +#endif + if (argc != 2) /* we return '2' for backward compatibility * with version from e2fsprogs */ --- misc-utils/namei.c 2009-07-03 23:20:01 +0000 +++ misc-utils.uclibc/namei.c 2009-11-22 15:52:53 +0000 @@ -75,6 +75,10 @@ static struct idcache *gcache; /* groupnames */ static struct idcache *ucache; /* usernames */ +#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 +static const char *program_invocation_short_name; +#endif + static struct idcache * get_id(struct idcache *ic, unsigned long int id) { @@ -446,6 +450,12 @@ bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); +#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 + char *program_invocation_short_name; + program_invocation_short_name = strrchr( argv[0], '/' ); + program_invocation_short_name = (program_invocation_short_name) ? program_invocation_short_name +1 : argv[0]; +#endif + if (argc < 2) usage(EXIT_FAILURE); --- misc-utils/scriptreplay.c 2009-09-07 07:24:49 +0000 +++ misc-utils.uclibc/scriptreplay.c 2009-11-22 15:53:29 +0000 @@ -30,6 +30,10 @@ #include "nls.h" +#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 +static const char *program_invocation_short_name; +#endif + #define SCRIPT_MIN_DELAY 0.0001 /* from original sripreplay.pl */ void __attribute__((__noreturn__)) @@ -133,6 +137,12 @@ bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); +#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 + char *program_invocation_short_name; + program_invocation_short_name = strrchr( argv[0], '/' ); + program_invocation_short_name = (program_invocation_short_name) ? program_invocation_short_name +1 : argv[0]; +#endif + if (argc < 2 && argc > 4) usage(EXIT_FAILURE); --- mount/swapon.c 2009-07-03 23:20:06 +0000 +++ mount.uclibc/swapon.c 2009-11-22 15:37:02 +0000 @@ -776,6 +776,11 @@ bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); +#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 + char *program_invocation_short_name; + program_invocation_short_name = strrchr( argv[0], '/' ); + program_invocation_short_name = (program_invocation_short_name) ? program_invocation_short_name +1 : argv[0]; +#endif progname = program_invocation_short_name; if (!progname) { char *p = strrchr(argv[0], '/'); --- sys-utils/ipcmk.c 2009-07-03 23:20:03 +0000 +++ sys-utils.uclibc/ipcmk.c 2009-11-22 15:37:15 +0000 @@ -100,6 +100,11 @@ int nsems = 0; int doShm = 0, doMsg = 0, doSem = 0; +#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 + char *program_invocation_short_name; + program_invocation_short_name = strrchr( argv[0], '/' ); + program_invocation_short_name = (program_invocation_short_name) ? program_invocation_short_name +1 : argv[0]; +#endif progname = program_invocation_short_name; if (!progname) progname = "ipcmk"; --- sys-utils/ldattach.c 2009-07-03 23:20:03 +0000 +++ sys-utils.uclibc/ldattach.c 2009-11-22 15:37:53 +0000 @@ -151,6 +151,11 @@ textdomain(PACKAGE); /* parse options */ +#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 + char *program_invocation_short_name; + program_invocation_short_name = strrchr( argv[0], '/' ); + program_invocation_short_name = (program_invocation_short_name) ? program_invocation_short_name +1 : argv[0]; +#endif progname = program_invocation_short_name; if (argc == 0) --- sys-utils/lscpu.c 2009-07-03 23:20:03 +0000 +++ sys-utils.uclibc/lscpu.c 2009-11-22 15:53:58 +0000 @@ -33,6 +33,10 @@ #include "nls.h" +#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 +static const char *program_invocation_short_name; +#endif + #define CACHE_MAX 100 /* /sys paths */ @@ -663,6 +667,12 @@ bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); +#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 + char *program_invocation_short_name; + program_invocation_short_name = strrchr( argv[0], '/' ); + program_invocation_short_name = (program_invocation_short_name) ? program_invocation_short_name +1 : argv[0]; +#endif + while((c = getopt_long(argc, argv, "hps:", longopts, NULL)) != -1) { switch (c) { case 'h': --- sys-utils/setarch.c 2009-07-03 23:20:03 +0000 +++ sys-utils.uclibc/setarch.c 2009-11-22 15:54:15 +0000 @@ -37,6 +37,10 @@ #include #include "nls.h" +#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 +static const char *program_invocation_short_name; +#endif + #define set_pers(pers) ((long)syscall(SYS_personality, pers)) /* Option --4gb has no equivalent short option, use a non-character as a @@ -245,6 +249,12 @@ bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); +#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 + const char *program_invocation_short_name; + program_invocation_short_name = strrchr( argv[0], '/' ); + program_invocation_short_name = (program_invocation_short_name) ? program_invocation_short_name +1 : argv[0]; +#endif + if (argc < 1) show_usage(_("Not enough arguments")); --- sys-utils/switch_root.c 2009-07-17 07:18:53 +0000 +++ sys-utils.uclibc/switch_root.c 2009-11-22 15:54:28 +0000 @@ -39,6 +39,10 @@ #define MS_MOVE 8192 #endif +#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 +static const char *program_invocation_short_name; +#endif + /* remove all files/directories below dirName -- don't cross mountpoints */ static int recursiveRemove(int fd) { @@ -247,6 +251,12 @@ { char *newroot, *init, **initargs; +#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 + const char *program_invocation_short_name; + program_invocation_short_name = strrchr( argv[0], '/' ); + program_invocation_short_name = (program_invocation_short_name) ? program_invocation_short_name +1 : argv[0]; +#endif + if (argv[1] && (!strcmp(argv[1], "--help") || !strcmp(argv[1], "-h"))) usage(stdout); if (argv[1] && (!strcmp(argv[1], "--version") || !strcmp(argv[1], "-V"))) --- configure 2009-09-07 09:22:14 +0000 +++ configure.uclibc 2009-11-22 17:39:44 +0000 @@ -17973,6 +17973,9 @@ int main () { +#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 +#error taskset unusable +#endif int test = SYS_sched_getaffinity; ; return 0;