From: Khem Raj <raj.khem@gmail.com>
To: linux-f2fs-devel@lists.sourceforge.net
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [f2fs-dev] [PATCH 2/2] f2fs_io: Define _FILE_OFFSET_BITS=64
Date: Wed, 21 Dec 2022 18:28:30 -0800 [thread overview]
Message-ID: <20221222022830.976309-2-raj.khem@gmail.com> (raw)
In-Reply-To: <20221222022830.976309-1-raj.khem@gmail.com>
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
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
lib/libf2fs_io.c | 4 +++-
tools/f2fs_io/f2fs_io.c | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/lib/libf2fs_io.c b/lib/libf2fs_io.c
index 1a8167d..abb43a3 100644
--- a/lib/libf2fs_io.c
+++ b/lib/libf2fs_io.c
@@ -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>
diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c
index 6dcd840..cb99039 100644
--- a/tools/f2fs_io/f2fs_io.c
+++ b/tools/f2fs_io/f2fs_io.c
@@ -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
--
2.39.0
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2022-12-22 2:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-22 2:28 [f2fs-dev] [PATCH 1/2] f2fs_io: Fix out of tree builds Khem Raj
2022-12-22 2:28 ` Khem Raj [this message]
2022-12-23 0:14 ` [f2fs-dev] [PATCH 2/2] f2fs_io: Define _FILE_OFFSET_BITS=64 Jaegeuk Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221222022830.976309-2-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).