summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMaarten Bosmans <mkbosmans@gmail.com>2011-01-04 16:48:06 +0100
committerMaarten Bosmans <mkbosmans@gmail.com>2011-02-17 11:58:22 +0100
commita951c779c6fe0705f75c1dfbe090deb78485b4e8 (patch)
tree147ddbb20473191046eaf281a0f52a35022024e3 /src
parentbb12ff83564d43566089dd979639c6993ba76665 (diff)
Use PCRE if POSIX regex.h is not available
Diffstat (limited to 'src')
-rw-r--r--src/modules/module-match.c7
-rw-r--r--src/pulsecore/core-util.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/src/modules/module-match.c b/src/modules/module-match.c
index d83c86c3..f9f36fdb 100644
--- a/src/modules/module-match.c
+++ b/src/modules/module-match.c
@@ -27,10 +27,15 @@
#include <string.h>
#include <errno.h>
#include <sys/types.h>
-#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
+#if defined(HAVE_REGEX_H)
+#include <regex.h>
+#elif defined(HAVE_PCREPOSIX_H)
+#include <pcreposix.h>
+#endif
+
#include <pulse/xmalloc.h>
#include <pulsecore/core-error.h>
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 4c4fbfe0..ba9e820d 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -40,7 +40,6 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <dirent.h>
-#include <regex.h>
#ifdef HAVE_LANGINFO_H
#include <langinfo.h>
@@ -50,6 +49,12 @@
#include <sys/utsname.h>
#endif
+#if defined(HAVE_REGEX_H)
+#include <regex.h>
+#elif defined(HAVE_PCREPOSIX_H)
+#include <pcreposix.h>
+#endif
+
#ifdef HAVE_STRTOF_L
#include <locale.h>
#endif