diff options
Diffstat (limited to 'devel/ltrace/patches/0001-Avoid-using-non-portable-error.h-in-generic-code.patch')
-rw-r--r-- | devel/ltrace/patches/0001-Avoid-using-non-portable-error.h-in-generic-code.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/devel/ltrace/patches/0001-Avoid-using-non-portable-error.h-in-generic-code.patch b/devel/ltrace/patches/0001-Avoid-using-non-portable-error.h-in-generic-code.patch new file mode 100644 index 0000000000..531677e245 --- /dev/null +++ b/devel/ltrace/patches/0001-Avoid-using-non-portable-error.h-in-generic-code.patch @@ -0,0 +1,38 @@ +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 + +Signed-off-by: Ismael Luceno <ismael@iodev.co.uk> +--- + read_config_file.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/read_config_file.c b/read_config_file.c +index e247436a307d..70d3bd32038b 100644 +--- 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.23.0 |