Message ID | 1619418187-19951-3-git-send-email-xuyang2018.jy@fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2,1/3] src/*: Fix an error for the loop initialization declaration | expand |
On Mon, Apr 26, 2021 at 02:23:07PM +0800, Yang Xu wrote: > When compile xfstest on old kernel, mount-idmapped.c will fail because of > missing linux/bpf.h. But this src file doesn't use bpf realted functions or macros. > > So remove these useless header files in idmapped-mounts.c and mount-idmapped.c. > > Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com> > --- Seems fine, Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
diff --git a/src/idmapped-mounts/idmapped-mounts.c b/src/idmapped-mounts/idmapped-mounts.c index 1a02953d..30f8f6e0 100644 --- a/src/idmapped-mounts/idmapped-mounts.c +++ b/src/idmapped-mounts/idmapped-mounts.c @@ -16,11 +16,9 @@ #include <pthread.h> #include <sched.h> #include <stdbool.h> -#include <sys/acl.h> #include <sys/fsuid.h> #include <sys/stat.h> #include <sys/types.h> -#include <sys/sysmacros.h> #include <sys/xattr.h> #include <unistd.h> diff --git a/src/idmapped-mounts/mount-idmapped.c b/src/idmapped-mounts/mount-idmapped.c index b3e9e27b..219104e7 100644 --- a/src/idmapped-mounts/mount-idmapped.c +++ b/src/idmapped-mounts/mount-idmapped.c @@ -9,11 +9,8 @@ #include <errno.h> #include <fcntl.h> #include <getopt.h> -#include <libgen.h> #include <limits.h> -#include <linux/bpf.h> #include <linux/sched.h> -#include <linux/seccomp.h> #include <sched.h> #include <signal.h> #include <stdbool.h> @@ -21,7 +18,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/mman.h> #include <sys/stat.h> #include <sys/syscall.h> #include <sys/types.h>
When compile xfstest on old kernel, mount-idmapped.c will fail because of missing linux/bpf.h. But this src file doesn't use bpf realted functions or macros. So remove these useless header files in idmapped-mounts.c and mount-idmapped.c. Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com> --- src/idmapped-mounts/idmapped-mounts.c | 2 -- src/idmapped-mounts/mount-idmapped.c | 4 ---- 2 files changed, 6 deletions(-)