f2fs_io: Fix out of tree builds
PATCH 1/2 f2fs_io: Fix out of tree builds
Relative path does not work when searching for include files when srcdir != builddir
--- tools/f2fs_io/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/f2fs_io/Makefile.am +1 -1
@@ -1,7 +1,7 @@ ## Makefile.am if LINUX -AM_CPPFLAGS = -I../../include +AM_CPPFLAGS = -I$(top_srcdir)/include AM_CFLAGS = -Wall sbin_PROGRAMS = f2fs_io f2fs_io_SOURCES = f2fs_io.c
Signature · 8 lines
2.39.0 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
PATCH 2/2 f2fs_io: Define _FILE_OFFSET_BITS=64
Remove _LARGEFILE64_SOURCE, this is redundant when _FILE_OFFSET_BITS=64 additionally it fixes build with musl because the detection logic for lseek64 fails because when using _LARGEFILE64_SOURCE musl also define's lseek64 as an alias to lseek
--- lib/libf2fs_io.c | 4 +++- tools/f2fs_io/f2fs_io.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-)
lib/libf2fs_io.c +3 -1
@@ -11,7 +11,9 @@* * Dual licensed under the GPL or LGPL version 2 licenses. */ -#define _LARGEFILE64_SOURCE +#ifndef _FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 64 +#endif #include <stdio.h> #include <stdlib.h>
tools/f2fs_io/f2fs_io.c +2 -2
@@ -12,8 +12,8 @@#ifndef _LARGEFILE_SOURCE#define _LARGEFILE_SOURCE#endif -#ifndef _LARGEFILE64_SOURCE -#define _LARGEFILE64_SOURCE +#ifndef _FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 64#endif #ifndef O_LARGEFILE #define O_LARGEFILE 0
Signature · 8 lines
2.39.0 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH 2/2] f2fs_io: Define _FILE_OFFSET_BITS=64
Quoted 16 lines · Khem Raj
Remove
_LARGEFILE64_SOURCE, this is redundant when _FILE_OFFSET_BITS=64 additionally it fixes build with musl because the detection logic for lseek64 fails because when using_LARGEFILE64_SOURCEmusl also define's lseek64 as an alias to lseekSigned-off-by Khem Raj <[email protected]>--- lib/libf2fs_io.c | 4 +++- tools/f2fs_io/f2fs_io.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-)lib/libf2fs_io.c +0
-0
lib/libf2fs_io.c line 16
Quoted 7 lines
lib/libf2fs_io.c +3
-1@@ -11,7 +11,9 @@* * Dual licensed under the GPL or LGPL version 2 licenses. */ -#define _LARGEFILE64_SOURCE +#ifndef _FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 64 +#endif
This fails to build in x86_64/gcc.
libf2fs_io.c:87:8: error: unknown type name 'off64_t'
87 | static off64_t *dcache_blk; /* which block it cached */
| ^~~~~~~
Quoted 27 lines
lib/libf2fs_io.c +0
-0#include <stdio.h> #include <stdlib.h> tools/f2fs_io/f2fs_io.c +2
-2@@ -12,8 +12,8 @@#ifndef _LARGEFILE_SOURCE#define _LARGEFILE_SOURCE#endif -#ifndef _LARGEFILE64_SOURCE -#define _LARGEFILE64_SOURCE +#ifndef _FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 64#endif #ifndef O_LARGEFILE #define O_LARGEFILE 0Signature · 8 lines
2.39.0 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel