diff options
Diffstat (limited to 'dev-util/ltrace/files')
-rw-r--r-- | dev-util/ltrace/files/ltrace-0.7.3-musl-host.patch | 11 | ||||
-rw-r--r-- | dev-util/ltrace/files/ltrace-0.7.3-no-REG_NOERROR.patch | 50 | ||||
-rw-r--r-- | dev-util/ltrace/files/ltrace-0.7.3-no-error.h-2.patch | 72 | ||||
-rw-r--r-- | dev-util/ltrace/files/ltrace-0.7.3-no-error.h.patch | 36 | ||||
-rw-r--r-- | dev-util/ltrace/files/ltrace-0.7.3-pid_t.patch | 10 |
5 files changed, 179 insertions, 0 deletions
diff --git a/dev-util/ltrace/files/ltrace-0.7.3-musl-host.patch b/dev-util/ltrace/files/ltrace-0.7.3-musl-host.patch new file mode 100644 index 000000000000..7729449d0604 --- /dev/null +++ b/dev-util/ltrace/files/ltrace-0.7.3-musl-host.patch @@ -0,0 +1,11 @@ +https://bugs.gentoo.org/713428 +--- a/configure.ac ++++ b/configure.ac +@@ -33,6 +33,7 @@ AC_CANONICAL_HOST + + case "${host_os}" in + linux-gnu*) HOST_OS="linux-gnu" ;; ++ linux-musl*) HOST_OS="linux-gnu" ;; + linux-uclibc*) HOST_OS="linux-gnu" ;; + *) AC_MSG_ERROR([unkown host-os ${host_os}]) ;; + esac diff --git a/dev-util/ltrace/files/ltrace-0.7.3-no-REG_NOERROR.patch b/dev-util/ltrace/files/ltrace-0.7.3-no-REG_NOERROR.patch new file mode 100644 index 000000000000..7fc8b60aa48a --- /dev/null +++ b/dev-util/ltrace/files/ltrace-0.7.3-no-REG_NOERROR.patch @@ -0,0 +1,50 @@ +From b6c5c8c51f954cfbe76424fd57c33a87166f0545 Mon Sep 17 00:00:00 2001 +From: Petr Machata <pmachata@redhat.com> +Date: Sat, 8 Dec 2012 03:23:39 +0100 +Subject: [PATCH] Avoid using REG_NOERROR + +Not all systems define this (IRIX 6.5 doesn't). Comparing to 0 is not +terribly less readable, so do that instead. +--- + glob.c | 4 ++-- + options.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/glob.c b/glob.c +index 9af633f..b26637f 100644 +--- a/glob.c ++++ b/glob.c +@@ -180,7 +180,7 @@ glob_to_regex(const char *glob, char **retp) + goto fail; + } + *retp = buf; +- return REG_NOERROR; ++ return 0; + } + + int +@@ -188,7 +188,7 @@ globcomp(regex_t *preg, const char *glob, int cflags) + { + char *regex = NULL; + int status = glob_to_regex(glob, ®ex); +- if (status != REG_NOERROR) ++ if (status != 0) + return status; + assert(regex != NULL); + status = regcomp(preg, regex, cflags); +diff --git a/options.c b/options.c +index e8fd2a2..4c7441e 100644 +--- a/options.c ++++ b/options.c +@@ -204,7 +204,7 @@ compile_libname(const char *expr, const char *a_lib, int lib_re_p, + + regex_t lib_re; + int status = (lib_re_p ? regcomp : globcomp)(&lib_re, lib, 0); +- if (status != REG_NOERROR) { ++ if (status != 0) { + char buf[100]; + regerror(status, &lib_re, buf, sizeof buf); + fprintf(stderr, "Rule near '%s' will be ignored: %s.\n", +-- +2.25.2 + diff --git a/dev-util/ltrace/files/ltrace-0.7.3-no-error.h-2.patch b/dev-util/ltrace/files/ltrace-0.7.3-no-error.h-2.patch new file mode 100644 index 000000000000..6b798b274909 --- /dev/null +++ b/dev-util/ltrace/files/ltrace-0.7.3-no-error.h-2.patch @@ -0,0 +1,72 @@ +From 1233b37167097dffa9a78bd7bd0a8117c75fe8ff Mon Sep 17 00:00:00 2001 +From: Petr Machata <pmachata@redhat.com> +Date: Sat, 8 Dec 2012 03:13:29 +0100 +Subject: [PATCH] expr_node_zero and expr_self should be stack-allocated + +--- + expr.c | 14 ++++++-------- + zero.c | 14 ++++++-------- + 2 files changed, 12 insertions(+), 16 deletions(-) + +--- a/expr.c ++++ b/expr.c +@@ -21,7 +21,6 @@ + #include <string.h> + #include <assert.h> + #include <errno.h> +-#include <error.h> + #include <stdlib.h> + + #include "expr.h" +@@ -327,12 +326,11 @@ expr_eval_constant(struct expr_node *node, long *valuep) + struct expr_node * + expr_self(void) + { +- static struct expr_node *node = NULL; +- if (node == NULL) { +- node = malloc(sizeof(*node)); +- if (node == NULL) +- error(1, errno, "malloc expr_self"); +- expr_init_self(node); ++ static struct expr_node *nodep = NULL; ++ if (nodep == NULL) { ++ static struct expr_node node; ++ expr_init_self(&node); ++ nodep = &node; + } +- return node; ++ return nodep; + } +--- a/zero.c ++++ b/zero.c +@@ -18,7 +18,6 @@ + * 02110-1301 USA + */ + +-#include <error.h> + #include <errno.h> + + #include "zero.h" +@@ -93,13 +92,12 @@ build_zero_w_arg(struct expr_node *expr, int own) + struct expr_node * + expr_node_zero(void) + { +- static struct expr_node *node = NULL; +- if (node == NULL) { +- node = malloc(sizeof(*node)); +- if (node == NULL) +- error(1, errno, "malloc expr_node_zero"); +- expr_init_cb1(node, &zero1_callback, ++ static struct expr_node *nodep = NULL; ++ if (nodep == NULL) { ++ static struct expr_node node; ++ expr_init_cb1(&node, &zero1_callback, + expr_self(), 0, (void *)-1); ++ nodep = &node; + } +- return node; ++ return nodep; + } +-- +2.25.2 + diff --git a/dev-util/ltrace/files/ltrace-0.7.3-no-error.h.patch b/dev-util/ltrace/files/ltrace-0.7.3-no-error.h.patch new file mode 100644 index 000000000000..56aea7a54d4d --- /dev/null +++ b/dev-util/ltrace/files/ltrace-0.7.3-no-error.h.patch @@ -0,0 +1,36 @@ +From 86a7b48310e0fd551f7f3d88ea9ad39c1a2807c6 Mon Sep 17 00:00:00 2001 +From: Petr Machata <pmachata@redhat.com> +Date: Sat, 8 Dec 2012 03:33:47 +0100 +Subject: [PATCH] Avoid using non-portable error.h in generic code + +--- + read_config_file.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +--- a/read_config_file.c ++++ b/read_config_file.c +@@ -27,7 +27,6 @@ + #include <stdlib.h> + #include <ctype.h> + #include <errno.h> +-#include <error.h> + #include <assert.h> + + #include "common.h" +@@ -1258,8 +1257,11 @@ void + init_global_config(void) + { + struct arg_type_info *info = malloc(2 * sizeof(*info)); +- if (info == NULL) +- error(1, errno, "malloc in init_global_config"); ++ if (info == NULL) { ++ fprintf(stderr, "Couldn't init global config: %s\n", ++ strerror(errno)); ++ exit(1); ++ } + + memset(info, 0, 2 * sizeof(*info)); + info[0].type = ARGTYPE_POINTER; +-- +2.25.2 + diff --git a/dev-util/ltrace/files/ltrace-0.7.3-pid_t.patch b/dev-util/ltrace/files/ltrace-0.7.3-pid_t.patch new file mode 100644 index 000000000000..b54a5bf3a00c --- /dev/null +++ b/dev-util/ltrace/files/ltrace-0.7.3-pid_t.patch @@ -0,0 +1,10 @@ +--- a/proc.h ++++ b/proc.h +@@ -26,6 +26,7 @@ + #include "config.h" + + #include <sys/time.h> ++#include <unistd.h> /* pid_t */ + + #if defined(HAVE_LIBUNWIND) + # include <libunwind.h> |