From 25d83da9643a325b621af74e965076094d6f80b3 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 21 Apr 2022 15:18:35 -0700 Subject: [PATCH] Fix PowerPC format string warnings commit c491657c0eb68d01dee5cc66ee3909dba5523540 category: bugfix issue: #I6VAS0 CVE: NA Signed-off-by: DongSenhao --------------------------------------- __SANE_USERSPACE_TYPES__ must be defined before is included. Hence this patch that moves the definition of that macro into the source files that need it. Signed-off-by: Bart Van Assche Signed-off-by: dongsenhao --- include/f2fs_fs.h | 7 ++++--- tools/f2fs_io/f2fs_io.c | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h index 88acd4c..1d7103c 100644 --- a/include/f2fs_fs.h +++ b/include/f2fs_fs.h @@ -17,6 +17,10 @@ #ifndef __F2FS_FS_H__ #define __F2FS_FS_H__ +#ifndef __SANE_USERSPACE_TYPES__ +#define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */ +#endif + #include #include #include @@ -42,9 +46,6 @@ #include #ifdef HAVE_LINUX_TYPES_H -#ifndef __SANE_USERSPACE_TYPES__ -#define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */ -#endif #include #endif #include diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c index 6bb094c..0edac6f 100644 --- a/tools/f2fs_io/f2fs_io.c +++ b/tools/f2fs_io/f2fs_io.c @@ -18,6 +18,9 @@ #ifndef O_LARGEFILE #define O_LARGEFILE 0 #endif +#ifndef __SANE_USERSPACE_TYPES__ +#define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */ +#endif #include #include