Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 214341 Details for
Bug 249582
sys-apps/util-linux-2.14.1 + uclibc - scriptreplay.c:39: error: `program_invocation_short_name' undeclared (first use in this function)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
uclibc compatibility patch for util-linux-2.16.1
util-linux-2.16-uclibc.patch (text/plain), 8.25 KB, created by
René Rhéaume (a.k.a. repzilon, rener)
on 2009-12-27 18:42:30 UTC
(
hide
)
Description:
uclibc compatibility patch for util-linux-2.16.1
Filename:
MIME Type:
Creator:
René Rhéaume (a.k.a. repzilon, rener)
Created:
2009-12-27 18:42:30 UTC
Size:
8.25 KB
patch
obsolete
>diff -urp util-linux-ng-2.16.1/configure util-linux-ng-2.16.1-uclibc/configure >--- util-linux-ng-2.16.1/configure 2009-09-07 05:22:14.000000000 -0400 >+++ util-linux-ng-2.16.1-uclibc/configure 2009-12-27 10:48:09.000000000 -0500 >@@ -17973,6 +17973,9 @@ cat >>conftest.$ac_ext <<_ACEOF > int > main () > { >+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 >+#error taskset unusable >+#endif > int test = SYS_sched_getaffinity; > ; > return 0; >diff -urp util-linux-ng-2.16.1/misc-utils/findfs.c util-linux-ng-2.16.1-uclibc/misc-utils/findfs.c >--- util-linux-ng-2.16.1/misc-utils/findfs.c 2009-07-03 19:20:01.000000000 -0400 >+++ util-linux-ng-2.16.1-uclibc/misc-utils/findfs.c 2009-12-27 11:55:16.000000000 -0500 >@@ -14,6 +14,10 @@ > > #include "nls.h" > >+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 >+char* program_invocation_short_name; >+#endif >+ > static void __attribute__((__noreturn__)) usage(int rc) > { > const char *p = program_invocation_short_name; >@@ -27,6 +31,11 @@ static void __attribute__((__noreturn__) > > int main(int argc, char **argv) > { >+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 >+ program_invocation_short_name = strrchr(argv[0], '/'); >+ program_invocation_short_name = program_invocation_short_name ? program_invocation_short_name+1 : argv[0]; >+#endif >+ > char *dev, *tk, *vl; > > setlocale(LC_ALL, ""); >diff -urp util-linux-ng-2.16.1/misc-utils/namei.c util-linux-ng-2.16.1-uclibc/misc-utils/namei.c >--- util-linux-ng-2.16.1/misc-utils/namei.c 2009-07-03 19:20:01.000000000 -0400 >+++ util-linux-ng-2.16.1-uclibc/misc-utils/namei.c 2009-12-27 11:55:16.000000000 -0500 >@@ -75,6 +75,10 @@ static int gwidth; /* maximal width of > static struct idcache *gcache; /* groupnames */ > static struct idcache *ucache; /* usernames */ > >+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 >+char* program_invocation_short_name; >+#endif >+ > static struct idcache * > get_id(struct idcache *ic, unsigned long int id) > { >@@ -439,6 +443,11 @@ struct option longopts[] = > int > main(int argc, char **argv) > { >+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 >+ program_invocation_short_name = strrchr(argv[0], '/'); >+ program_invocation_short_name = program_invocation_short_name ? program_invocation_short_name+1 : argv[0]; >+#endif >+ > extern int optind; > int c; > >diff -urp util-linux-ng-2.16.1/misc-utils/scriptreplay.c util-linux-ng-2.16.1-uclibc/misc-utils/scriptreplay.c >--- util-linux-ng-2.16.1/misc-utils/scriptreplay.c 2009-09-07 03:24:49.000000000 -0400 >+++ util-linux-ng-2.16.1-uclibc/misc-utils/scriptreplay.c 2009-12-27 11:55:16.000000000 -0500 >@@ -32,6 +32,10 @@ > > #define SCRIPT_MIN_DELAY 0.0001 /* from original sripreplay.pl */ > >+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 >+char* program_invocation_short_name; >+#endif >+ > void __attribute__((__noreturn__)) > usage(int rc) > { >@@ -116,6 +120,11 @@ emit(FILE *fd, const char *filename, siz > int > main(int argc, char *argv[]) > { >+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 >+ program_invocation_short_name = strrchr(argv[0], '/'); >+ program_invocation_short_name = program_invocation_short_name ? program_invocation_short_name+1 : argv[0]; >+#endif >+ > FILE *tfile, *sfile; > const char *sname, *tname; > double divi; >diff -urp util-linux-ng-2.16.1/mount/swapon.c util-linux-ng-2.16.1-uclibc/mount/swapon.c >--- util-linux-ng-2.16.1/mount/swapon.c 2009-07-03 19:20:06.000000000 -0400 >+++ util-linux-ng-2.16.1-uclibc/mount/swapon.c 2009-12-27 11:53:32.000000000 -0500 >@@ -776,11 +776,16 @@ main(int argc, char *argv[]) { > bindtextdomain(PACKAGE, LOCALEDIR); > textdomain(PACKAGE); > >+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 >+ char *p = strrchr(argv[0], '/'); >+ progname = p ? p+1 : argv[0]; >+#else > progname = program_invocation_short_name; > if (!progname) { > char *p = strrchr(argv[0], '/'); > progname = p ? p+1 : argv[0]; > } >+#endif > > if (streq(progname, "swapon")) > return main_swapon(argc, argv); >diff -urp util-linux-ng-2.16.1/sys-utils/ipcmk.c util-linux-ng-2.16.1-uclibc/sys-utils/ipcmk.c >--- util-linux-ng-2.16.1/sys-utils/ipcmk.c 2009-07-03 19:20:03.000000000 -0400 >+++ util-linux-ng-2.16.1-uclibc/sys-utils/ipcmk.c 2009-12-27 10:51:45.000000000 -0500 >@@ -100,9 +100,14 @@ int main(int argc, char **argv) > int nsems = 0; > int doShm = 0, doMsg = 0, doSem = 0; > >+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 >+ char *argv0_slash = strrchr(argv[0], '/'); >+ progname = argv0_slash ? argv0_slash+1 : argv[0]; >+#else > progname = program_invocation_short_name; > if (!progname) > progname = "ipcmk"; >+#endif > > setlocale(LC_ALL, ""); > bindtextdomain(PACKAGE, LOCALEDIR); >diff -urp util-linux-ng-2.16.1/sys-utils/ldattach.c util-linux-ng-2.16.1-uclibc/sys-utils/ldattach.c >--- util-linux-ng-2.16.1/sys-utils/ldattach.c 2009-07-03 19:20:03.000000000 -0400 >+++ util-linux-ng-2.16.1-uclibc/sys-utils/ldattach.c 2009-12-27 12:04:48.000000000 -0500 >@@ -73,6 +73,10 @@ ld_table[] = { > { "PPS", N_PPS }, > }; > >+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 >+char* program_invocation_short_name; >+#endif >+ > /* look up line discipline code */ > static int lookup_ld(const char *s) > { >@@ -123,6 +127,11 @@ static int my_cfsetspeed(struct termios > > int main(int argc, char **argv) > { >+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 >+ program_invocation_short_name = strrchr(argv[0], '/'); >+ program_invocation_short_name = program_invocation_short_name ? program_invocation_short_name+1 : argv[0]; >+#endif >+ > int tty_fd; > struct termios ts; > int speed = 0, bits = '-', parity = '-', stop = '-'; >diff -urp util-linux-ng-2.16.1/sys-utils/lscpu.c util-linux-ng-2.16.1-uclibc/sys-utils/lscpu.c >--- util-linux-ng-2.16.1/sys-utils/lscpu.c 2009-07-03 19:20:03.000000000 -0400 >+++ util-linux-ng-2.16.1-uclibc/sys-utils/lscpu.c 2009-12-27 11:55:16.000000000 -0500 >@@ -114,6 +114,10 @@ struct cpu_desc { > > char pathbuf[PATH_MAX] = "/"; > >+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 >+char* program_invocation_short_name; >+#endif >+ > static void path_scanstr(char *result, const char *path, ...) > __attribute__ ((__format__ (__printf__, 2, 3))); > static int path_exist(const char *path, ...) >@@ -649,6 +653,11 @@ ca_compare(const void *a, const void *b) > > int main(int argc, char *argv[]) > { >+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 >+ program_invocation_short_name = strrchr(argv[0], '/'); >+ program_invocation_short_name = program_invocation_short_name ? program_invocation_short_name+1 : argv[0]; >+#endif >+ > struct cpu_desc _cpu, *cpu = &_cpu; > int parsable = 0, c; > >diff -urp util-linux-ng-2.16.1/sys-utils/setarch.c util-linux-ng-2.16.1-uclibc/sys-utils/setarch.c >--- util-linux-ng-2.16.1/sys-utils/setarch.c 2009-07-03 19:20:03.000000000 -0400 >+++ util-linux-ng-2.16.1-uclibc/sys-utils/setarch.c 2009-12-27 11:55:16.000000000 -0500 >@@ -102,6 +102,10 @@ struct option longopts[] = > { NULL, 0, 0, 0 } > }; > >+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 >+char* program_invocation_short_name; >+#endif >+ > static void __attribute__((__noreturn__)) > show_help(void) > { >@@ -236,6 +240,11 @@ int set_arch(const char *pers, unsigned > > int main(int argc, char *argv[]) > { >+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 >+ program_invocation_short_name = strrchr(argv[0], '/'); >+ program_invocation_short_name = program_invocation_short_name ? program_invocation_short_name+1 : argv[0]; >+#endif >+ > const char *p; > unsigned long options = 0; > int verbose = 0; >diff -urp util-linux-ng-2.16.1/sys-utils/switch_root.c util-linux-ng-2.16.1-uclibc/sys-utils/switch_root.c >--- util-linux-ng-2.16.1/sys-utils/switch_root.c 2009-07-17 03:18:53.000000000 -0400 >+++ util-linux-ng-2.16.1-uclibc/sys-utils/switch_root.c 2009-12-27 11:55:16.000000000 -0500 >@@ -39,6 +39,10 @@ > #define MS_MOVE 8192 > #endif > >+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 >+char* program_invocation_short_name; >+#endif >+ > /* remove all files/directories below dirName -- don't cross mountpoints */ > static int recursiveRemove(int fd) > { >@@ -245,6 +249,11 @@ static void version(void) > > int main(int argc, char *argv[]) > { >+#if defined(__UCLIBC__) && __UCLIBC_SUBLEVEL__ <= 28 >+ program_invocation_short_name = strrchr(argv[0], '/'); >+ program_invocation_short_name = program_invocation_short_name ? program_invocation_short_name+1 : argv[0]; >+#endif >+ > char *newroot, *init, **initargs; > > if (argv[1] && (!strcmp(argv[1], "--help") || !strcmp(argv[1], "-h")))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 249582
:
177181
|
211050
| 214341 |
214343
|
228597
|
228599