Blame SOURCES/fapolicyd-markfs-2.patch

6db311
From ca225c8e83b37e5f29703d7352af0b937b2e933c Mon Sep 17 00:00:00 2001
6db311
From: Steve Grubb <sgrubb@redhat.com>
6db311
Date: Tue, 27 Sep 2022 19:41:24 -0400
6db311
Subject: [PATCH] Correct the optional inclusion of code based on
6db311
 HAVE_DECL_FAN_MARK_FILESYSTEM
6db311
6db311
---
6db311
 ChangeLog                   | 1 +
6db311
 src/daemon/notify.c         | 2 +-
6db311
 src/library/daemon-config.c | 2 +-
6db311
 3 files changed, 3 insertions(+), 2 deletions(-)
6db311
6db311
diff --git a/src/daemon/notify.c b/src/daemon/notify.c
6db311
index c91abc4..f36b644 100644
6db311
--- a/src/daemon/notify.c
6db311
+++ b/src/daemon/notify.c
6db311
@@ -124,7 +124,7 @@ int init_fanotify(const conf_t *conf, mlist *m)
6db311
 	while (path) {
6db311
 retry_mark:
6db311
 		unsigned int flags = FAN_MARK_ADD;
6db311
-#ifdef HAVE_DECL_FAN_MARK_FILESYSTEM
6db311
+#if HAVE_DECL_FAN_MARK_FILESYSTEM != 0
6db311
 		if (conf->allow_filesystem_mark)
6db311
 		    flags |= FAN_MARK_FILESYSTEM;
6db311
 #else
6db311
diff --git a/src/library/daemon-config.c b/src/library/daemon-config.c
6db311
index 89b7f68..778b89a 100644
6db311
--- a/src/library/daemon-config.c
6db311
+++ b/src/library/daemon-config.c
6db311
@@ -618,7 +618,7 @@ static int fs_mark_parser(const struct nv_pair *nv, int line,
6db311
 		conf_t *config)
6db311
 {
6db311
 	int rc = 0;
6db311
-#ifndef HAVE_DECL_FAN_MARK_FILESYSTEM
6db311
+#if HAVE_DECL_FAN_MARK_FILESYSTEM == 0
6db311
 	msg(LOG_WARNING,
6db311
 	    "allow_filesystem_mark is unsupported on this kernel - ignoring");
6db311
 #else