[PATCH][v3] libselinux: support building on older PCRE libs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Versions of PCRE prior to 8.20 did not have pcre_free_study().  In its
absence, use pcre_free() instead.

Signed-off-by: Joe MacDonald <joe@xxxxxxxxxxxx>
---

[Re: [PATCH] libselinux: support building on older PCRE libs] On 13.10.22 (Tue
11:56) Stephen Smalley wrote:

> I think you want PCRE_MAJOR < 8 || PCRE_MAJOR == 8 && PCRE_MINOR < 20 to
> avoid problems when we get to version 9.

That is exactly what I wanted, thanks Stephen.

-J.

 libselinux/src/label_file.h |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libselinux/src/label_file.h b/libselinux/src/label_file.h
index bf0c9e2..0aad3e7 100644
--- a/libselinux/src/label_file.h
+++ b/libselinux/src/label_file.h
@@ -8,6 +8,11 @@
 #define SELINUX_MAGIC_COMPILED_FCONTEXT	0xf97cff8a
 #define SELINUX_COMPILED_FCONTEXT_MAX_VERS	1
 
+/* Prior to verison 8.20, libpcre did not have pcre_free_study() */
+#if (PCRE_MAJOR < 8 || (PCRE_MAJOR == 8 && PCRE_MINOR < 20))
+#define pcre_free_study  pcre_free
+#endif
+
 /* A file security context specification. */
 struct spec {
 	struct selabel_lookup_rec lr;	/* holds contexts for lookup result */
-- 
1.7.9.5


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux