* building with -DUSE_PCRE should include PCRE headers and not regex.h. At
least on Solaris, this caused the libc's regex primitives to be used instead
of PCRE, which caused trouble on group references. This is now fixed.
diff --git a/haproxy.c b/haproxy.c
index e362df5..723c15f 100644
--- a/haproxy.c
+++ b/haproxy.c
@@ -52,8 +52,15 @@
#include <stdarg.h>
#include <sys/resource.h>
#include <time.h>
-#include <regex.h>
#include <syslog.h>
+
+#ifdef USE_PCRE
+#include <pcre.h>
+#include <pcreposix.h>
+#else
+#include <regex.h>
+#endif
+
#if defined(TPROXY) && defined(NETFILTER)
#include <linux/netfilter_ipv4.h>
#endif