summaryrefslogtreecommitdiffstats
path: root/devel/ltrace/patches/0001-Avoid-using-REG_NOERROR.patch
diff options
context:
space:
mode:
Diffstat (limited to 'devel/ltrace/patches/0001-Avoid-using-REG_NOERROR.patch')
-rw-r--r--devel/ltrace/patches/0001-Avoid-using-REG_NOERROR.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/devel/ltrace/patches/0001-Avoid-using-REG_NOERROR.patch b/devel/ltrace/patches/0001-Avoid-using-REG_NOERROR.patch
new file mode 100644
index 0000000000..3876c1f098
--- /dev/null
+++ b/devel/ltrace/patches/0001-Avoid-using-REG_NOERROR.patch
@@ -0,0 +1,51 @@
+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.
+
+Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
+---
+ glob.c | 4 ++--
+ options.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/glob.c b/glob.c
+index 9af633f85e16..b26637f61379 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, &regex);
+- 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 e8fd2a2c525e..4c7441e05263 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.23.0