libselinux: support building on older PCRE libs

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@deserted.net>
This commit is contained in:
Joe MacDonald 2013-10-22 12:57:36 -04:00 committed by Stephen Smalley
parent d4209743e9
commit 2864f757dd

View file

@ -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 */