diff options
author | David Seifert <soap@gentoo.org> | 2022-07-13 20:12:06 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2022-07-13 20:12:06 +0200 |
commit | 231b90fbc3ab287472363374377241a4eacf24cd (patch) | |
tree | f7fff2645a7d66fa4b7933d9c66efffa94bdc7fc /app-forensics | |
parent | dev-lang/R: add 4.2.1 (diff) | |
download | gentoo-231b90fbc3ab287472363374377241a4eacf24cd.tar.gz gentoo-231b90fbc3ab287472363374377241a4eacf24cd.tar.bz2 gentoo-231b90fbc3ab287472363374377241a4eacf24cd.zip |
app-forensics/foremost: fix musl build
Closes: https://bugs.gentoo.org/830473
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'app-forensics')
-rw-r--r-- | app-forensics/foremost/files/foremost-1.5.7-musl.patch | 81 | ||||
-rw-r--r-- | app-forensics/foremost/foremost-1.5.7-r3.ebuild | 3 |
2 files changed, 83 insertions, 1 deletions
diff --git a/app-forensics/foremost/files/foremost-1.5.7-musl.patch b/app-forensics/foremost/files/foremost-1.5.7-musl.patch new file mode 100644 index 000000000000..0f8994b2328f --- /dev/null +++ b/app-forensics/foremost/files/foremost-1.5.7-musl.patch @@ -0,0 +1,81 @@ +--- a/cli.c ++++ b/cli.c +@@ -4,7 +4,7 @@ + + void fatal_error (f_state * s, char *msg) + { +- fprintf(stderr, "%s: %s%s", __progname, msg, NEWLINE); ++ fprintf(stderr, "%s: %s%s", program_invocation_short_name, msg, NEWLINE); + if (get_audit_file_open(s)) + { + audit_msg(s, msg); +@@ -16,7 +16,7 @@ + void print_error(f_state *s, char *fn, char *msg) + { + if (!(get_mode(s, mode_quiet))) +- fprintf(stderr, "%s: %s: %s%s", __progname, fn, msg, NEWLINE); ++ fprintf(stderr, "%s: %s: %s%s", program_invocation_short_name, fn, msg, NEWLINE); + } + + void print_message(f_state *s, char *format, va_list argp) +--- a/helpers.c ++++ b/helpers.c +@@ -133,7 +133,7 @@ + if (ioctl(fd, BLKGETSIZE, &num_sectors)) + { + #if defined(__DEBUG) +- fprintf(stderr, "%s: ioctl call to BLKGETSIZE failed.%s", __progname, NEWLINE); ++ fprintf(stderr, "%s: ioctl call to BLKGETSIZE failed.%s", program_invocation_short_name, NEWLINE); + #endif + } + else +--- a/main.c ++++ b/main.c +@@ -55,18 +55,18 @@ + + void try_msg(void) + { +- fprintf(stderr, "Try `%s -h` for more information.%s", __progname, NEWLINE); ++ fprintf(stderr, "Try `%s -h` for more information.%s", program_invocation_short_name, NEWLINE); + } + + /* The usage function should, at most, display 22 lines of text to fit + on a single screen */ + void usage(void) + { +- fprintf(stderr, "%s version %s by %s.%s", __progname, VERSION, AUTHOR, NEWLINE); ++ fprintf(stderr, "%s version %s by %s.%s", program_invocation_short_name, VERSION, AUTHOR, NEWLINE); + fprintf(stderr, + "%s %s [-v|-V|-h|-T|-Q|-q|-a|-w-d] [-t <type>] [-s <blocks>] [-k <size>] \n\t[-b <size>] [-c <file>] [-o <dir>] [-i <file] %s%s", + CMD_PROMPT, +- __progname, ++ program_invocation_short_name, + NEWLINE, + NEWLINE); + fprintf(stderr, "-V - display copyright information and exit%s", NEWLINE); +@@ -233,10 +233,6 @@ + char **temp = argv; + DIR* dir; + +-#ifndef __GLIBC__ +- __progname = basename(argv[0]); +-#endif +- + /*Initialize the global state struct*/ + if (initialize_state(s, argc, argv)) + fatal_error(s, "Unable to initialize state"); +--- a/main.h ++++ b/main.h +@@ -187,12 +187,6 @@ + #endif /* ifdef _WIN32 */
+
+
+-/* On non-glibc systems we have to manually set the __progname variable */
+-#ifdef __GLIBC__
+-extern char *__progname;
+-#else
+-char *__progname;
+-#endif /* ifdef __GLIBC__ */
+
+ /* -----------------------------------------------------------------
+ Program Defaults
diff --git a/app-forensics/foremost/foremost-1.5.7-r3.ebuild b/app-forensics/foremost/foremost-1.5.7-r3.ebuild index c3742c315533..7e998708b14f 100644 --- a/app-forensics/foremost/foremost-1.5.7-r3.ebuild +++ b/app-forensics/foremost/foremost-1.5.7-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -21,6 +21,7 @@ PATCHES=( "${FILESDIR}/${PN}-1.5.7-format-security.patch" # bug 521038 "${FILESDIR}/${PN}-1.5.7-set-but-unused.patch" # bug 706886 "${FILESDIR}/${PN}-1.5.7-fno-common.patch" # bug 722196 + "${FILESDIR}/${PN}-1.5.7-musl.patch" # bug 830473 ) src_compile() { |