Blame SOURCES/fapolicyd-markfs-2.patch

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