Blame SOURCES/make_is_local_fs_static_again.patch

7a6a25
From 535c48739dc89efc76bfd267d3f39dca05cbebd1 Mon Sep 17 00:00:00 2001
7a6a25
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
7a6a25
Date: Thu, 6 Jun 2019 09:14:20 +0200
7a6a25
Subject: [PATCH] Make is_local_fs static again
7a6a25
7a6a25
It isn't necessary to expose this function in public API.
7a6a25
The function has been accidentaly introduced to public API
7a6a25
in fff58197d9747a08d0fc23914a31fefbe44f07ea which hasn't
7a6a25
been released yet, so it can be safe to remove it.
7a6a25
---
7a6a25
 src/OVAL/probes/fsdev.c                   |  4 ++--
7a6a25
 src/OVAL/probes/public/fsdev.h            | 10 ----------
7a6a25
 tests/API/probes/Makefile.am              |  3 ++-
7a6a25
 tests/API/probes/test_fsdev_is_local_fs.c |  1 +
7a6a25
 4 files changed, 5 insertions(+), 13 deletions(-)
7a6a25
7a6a25
diff --git a/src/OVAL/probes/fsdev.c b/src/OVAL/probes/fsdev.c
7a6a25
index 9646cac80..f5f14ac2f 100644
7a6a25
--- a/src/OVAL/probes/fsdev.c
7a6a25
+++ b/src/OVAL/probes/fsdev.c
7a6a25
@@ -79,7 +79,7 @@ static int fsdev_cmp(const void *a, const void *b)
7a6a25
 #define DEVID_ARRAY_ADD  8
7a6a25
 
7a6a25
 #if defined(__linux__)
7a6a25
-int is_local_fs(struct mntent *ment)
7a6a25
+static int is_local_fs(struct mntent *ment)
7a6a25
 {
7a6a25
 // todo: would it be usefull to provide the choice during build-time?
7a6a25
 #if 1
7a6a25
@@ -129,7 +129,7 @@ int is_local_fs(struct mntent *ment)
7a6a25
 }
7a6a25
 
7a6a25
 #elif defined(_AIX)
7a6a25
-int is_local_fs(struct mntent *ment)
7a6a25
+static int is_local_fs(struct mntent *ment)
7a6a25
 {
7a6a25
 	int i;
7a6a25
 	struct vfs_ent *e;
7a6a25
diff --git a/src/OVAL/probes/public/fsdev.h b/src/OVAL/probes/public/fsdev.h
7a6a25
index bbead1aee..29a0462c8 100644
7a6a25
--- a/src/OVAL/probes/public/fsdev.h
7a6a25
+++ b/src/OVAL/probes/public/fsdev.h
7a6a25
@@ -86,15 +86,5 @@ int fsdev_path(fsdev_t * lfs, const char *path);
7a6a25
  */
7a6a25
 int fsdev_fd(fsdev_t * lfs, int fd);
7a6a25
 
7a6a25
-#if defined(__linux__) || defined(_AIX)
7a6a25
-/**
7a6a25
- * Detemines whether a given mtab entry is a local file system.
7a6a25
- * @param ment Structure returned by getmntent (see `man 3 getmntent`).
7a6a25
- * @retval 1 if local
7a6a25
- * @retval 0 otherwise
7a6a25
- */
7a6a25
-int is_local_fs(struct mntent *ment);
7a6a25
-#endif
7a6a25
-
7a6a25
 #endif				/* FSDEV_H */
7a6a25
 /// @}
7a6a25
diff --git a/tests/API/probes/Makefile.am b/tests/API/probes/Makefile.am
7a6a25
index 459e5f3af..fa9c26b54 100644
7a6a25
--- a/tests/API/probes/Makefile.am
7a6a25
+++ b/tests/API/probes/Makefile.am
7a6a25
@@ -5,8 +5,9 @@ AM_CPPFLAGS = \
7a6a25
 	-I$(top_srcdir)/src/CPE/public \
7a6a25
 	-I$(top_srcdir)/src/CVE/public \
7a6a25
 	-I${top_srcdir}/src/CVSS/public \
7a6a25
-	-I$(top_srcdir)/src/OVAL/probes/SEAP/public \
7a6a25
+	-I$(top_srcdir)/src/OVAL/probes \
7a6a25
 	-I$(top_srcdir)/src/OVAL/probes/public \
7a6a25
+	-I$(top_srcdir)/src/OVAL/probes/SEAP/public \
7a6a25
 	-I$(top_srcdir)/src/OVAL/public \
7a6a25
 	-I$(top_srcdir)/src/XCCDF/public \
7a6a25
 	-I$(top_srcdir)/src/common/public \
7a6a25
diff --git a/tests/API/probes/test_fsdev_is_local_fs.c b/tests/API/probes/test_fsdev_is_local_fs.c
7a6a25
index e3b4691db..085a02a31 100644
7a6a25
--- a/tests/API/probes/test_fsdev_is_local_fs.c
7a6a25
+++ b/tests/API/probes/test_fsdev_is_local_fs.c
7a6a25
@@ -28,6 +28,7 @@
7a6a25
 #include <string.h>
7a6a25
 #include <mntent.h>
7a6a25
 #include "fsdev.h"
7a6a25
+#include "fsdev.c"
7a6a25
 
7a6a25
 static int test_single_call()
7a6a25
 {