From 5ab2e777991e2bef65a2340580a6055508ae61d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 20 Aug 2022 12:59:57 +0200
Subject: [PATCH] casync: drop kernel includes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
With glibc-2.36-1.fc37.x86_64 and kernel-headers-5.19.0-1.fc37.x86_64:
In file included from /usr/include/linux/fs.h:19,
from ../src/caencoder.c:21:
/usr/include/linux/mount.h:95:6: error: redeclaration of ‘enum fsconfig_command’
95 | enum fsconfig_command {
| ^~~~~~~~~~~~~~~~
In file included from ../src/caencoder.c:15:
/usr/include/sys/mount.h:189:6: note: originally defined here
189 | enum fsconfig_command
| ^~~~~~~~~~~~~~~~
/usr/include/linux/mount.h:96:9: error: redeclaration of enumerator ‘FSCONFIG_SET_FLAG’
96 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
| ^~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:191:3: note: previous definition of ‘FSCONFIG_SET_FLAG’ with type ‘enum fsconfig_command’
191 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
| ^~~~~~~~~~~~~~~~~
/usr/include/linux/mount.h:97:9: error: redeclaration of enumerator ‘FSCONFIG_SET_STRING’
97 | FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */
| ^~~~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:193:3: note: previous definition of ‘FSCONFIG_SET_STRING’ with type ‘enum fsconfig_command’
193 | FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */
| ^~~~~~~~~~~~~~~~~~~
/usr/include/linux/mount.h:98:9: error: redeclaration of enumerator ‘FSCONFIG_SET_BINARY’
98 | FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */
| ^~~~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:195:3: note: previous definition of ‘FSCONFIG_SET_BINARY’ with type ‘enum fsconfig_command’
195 | FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */
| ^~~~~~~~~~~~~~~~~~~
/usr/include/linux/mount.h:99:9: error: redeclaration of enumerator ‘FSCONFIG_SET_PATH’
99 | FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */
| ^~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:197:3: note: previous definition of ‘FSCONFIG_SET_PATH’ with type ‘enum fsconfig_command’
197 | FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */
| ^~~~~~~~~~~~~~~~~
/usr/include/linux/mount.h:100:9: error: redeclaration of enumerator ‘FSCONFIG_SET_PATH_EMPTY’
100 | FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:199:3: note: previous definition of ‘FSCONFIG_SET_PATH_EMPTY’ with type ‘enum fsconfig_command’
199 | FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/linux/mount.h:101:9: error: redeclaration of enumerator ‘FSCONFIG_SET_FD’
101 | FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */
| ^~~~~~~~~~~~~~~
/usr/include/sys/mount.h:201:3: note: previous definition of ‘FSCONFIG_SET_FD’ with type ‘enum fsconfig_command’
201 | FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */
| ^~~~~~~~~~~~~~~
/usr/include/linux/mount.h:102:9: error: redeclaration of enumerator ‘FSCONFIG_CMD_CREATE’
102 | FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */
| ^~~~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:203:3: note: previous definition of ‘FSCONFIG_CMD_CREATE’ with type ‘enum fsconfig_command’
203 | FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */
| ^~~~~~~~~~~~~~~~~~~
/usr/include/linux/mount.h:103:9: error: redeclaration of enumerator ‘FSCONFIG_CMD_RECONFIGURE’
103 | FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:205:3: note: previous definition of ‘FSCONFIG_CMD_RECONFIGURE’ with type ‘enum fsconfig_command’
205 | FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/linux/mount.h:129:8: error: redefinition of ‘struct mount_attr’
129 | struct mount_attr {
| ^~~~~~~~~~
/usr/include/sys/mount.h:161:8: note: originally defined here
161 | struct mount_attr
| ^~~~~~~~~~
---
src/caencoder.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/caencoder.c b/src/caencoder.c
index 5999104de6..edb0447535 100644
--- a/src/caencoder.c
+++ b/src/caencoder.c
@@ -18,10 +18,6 @@
#include <sys/xattr.h>
#include <unistd.h>
-#include <linux/fs.h>
-#include <linux/magic.h>
-#include <linux/msdos_fs.h>
-
#if HAVE_SELINUX
# include <selinux/selinux.h>
#endif