From 3b91f67ec7f53962f951d3bfcf44e5e283399b55 Mon Sep 17 00:00:00 2001
From: Peter Meerwald
Date: Fri, 29 Nov 2013 15:58:42 +0100
Subject: [PATCH] core-util: Check that we actually have regexec before we use
it
https://bugs.freedesktop.org/show_bug.cgi?id=69708
---
src/pulsecore/core-util.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index a2c3a39..06c3884 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -954,6 +954,7 @@ void pa_reset_priority(void) {
}
int pa_match(const char *expr, const char *v) {
+#if defined(HAVE_REGEX_H) || defined(HAVE_PCREPOSIX_H)
int k;
regex_t re;
int r;
@@ -976,6 +977,10 @@ int pa_match(const char *expr, const char *v) {
errno = EINVAL;
return r;
+#else
+ errno = ENOSYS;
+ return -1;
+#endif
}
/* Try to parse a boolean string value.*/
--
1.7.9.5