summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-10-21 22:01:02 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-10-21 22:01:02 +0100
commit5b4f35741ef91e9b4a33e2bcc60f209927c6cc5d (patch)
tree50e96933fe16359ee4b5174ecb023721876f47f9 /sys-fs
parentb80ebc4dea5609f6644d0d64c5ace579df314923 (diff)
gentoo auto-resync : 21:10:2023 - 22:01:01
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/Manifest.gzbin22399 -> 22397 bytes
-rw-r--r--sys-fs/btrfs-progs/Manifest2
-rw-r--r--sys-fs/btrfs-progs/btrfs-progs-6.5.3.ebuild161
-rw-r--r--sys-fs/f2fs-tools/Manifest2
-rw-r--r--sys-fs/f2fs-tools/f2fs-tools-1.16.0-r1.ebuild56
-rw-r--r--sys-fs/f2fs-tools/files/f2fs-tools-1.16.0-musl-1.2.4-lfs.patch403
6 files changed, 624 insertions, 0 deletions
diff --git a/sys-fs/Manifest.gz b/sys-fs/Manifest.gz
index 0ba1f0aac269..5126498dab4e 100644
--- a/sys-fs/Manifest.gz
+++ b/sys-fs/Manifest.gz
Binary files differ
diff --git a/sys-fs/btrfs-progs/Manifest b/sys-fs/btrfs-progs/Manifest
index 0866a4e08b14..a8a002c37277 100644
--- a/sys-fs/btrfs-progs/Manifest
+++ b/sys-fs/btrfs-progs/Manifest
@@ -4,12 +4,14 @@ DIST btrfs-progs-v6.3.2.tar.xz 3160148 BLAKE2B e6815eeb90c1dbf9a6c4a5aa72262c18b
DIST btrfs-progs-v6.3.3.tar.xz 3163112 BLAKE2B 76714da94e1cd733df4198b736c31b32d4cfb6779985036610651a267fcf92299c140f99f2372278cafcb02f651413c069314195b7bd44d56ddf60eb60e5532d SHA512 e72791fd91cc9a93aaab72bf8c36f9d7e2608315ccb3b0474ca0c1e1893465b2c7145ce523216accb0d02c4dd0fd13597702ce6a8b9c2ac137cd9bce3c5a4347
DIST btrfs-progs-v6.5.1.tar.xz 3179504 BLAKE2B 95d424342dfa238ed4dd525f72618b449e91db198fa6a12bcbb6bb48246d7b5b84a8fd5dc3b943246732fa40c3b575855c966f8ca135b32aa926e0709549cb99 SHA512 87cc81ecad0cb22de3086fef0fd825be101344d44dc954ac05e25d394421ca5fe3dbcb27c79a3a8fb67a2d3237b7bd84329ccef2c070b1b07d1156dc08716dfb
DIST btrfs-progs-v6.5.2.tar.xz 3190068 BLAKE2B 74010ed51e211d28ce161db9f6e005bb1c73d8726c9a74446520a46bfa8d6f25d267f747e392f82a8ebeb0b9dd25b3681e9617048e33b9244047089a36fc34c6 SHA512 40b5a2f4d4dcf1810eeb0808e6cb72081ef5743a5072b75e2535420b6acb3a3ead61b01da3217c2bc3fb6ec700f141d4646389cc7a6476ce8af51a424a732672
+DIST btrfs-progs-v6.5.3.tar.xz 2542416 BLAKE2B 83a39e1a991ad253a8733235c01fed32c23bde033b7ddc647347dba54a9ba5755d8508e6df817a627d59cefbed6a5696ec485093509ab007374d27c739dabfb1 SHA512 6bec6c0da0b61eb4dce6dc3128fe34fdc68b18cbbb7917c3cd13a558cee9464e6b4c1fcda2cab342d1b506767fab4eee5d03d2fb284a5c7249eec5a75407034a
DIST btrfs-progs-v6.5.tar.xz 3178048 BLAKE2B 502d8cebab1d35d8d69eb76212476e323d9f19a9d32eb304acaeb1fc27bfff3ca801fcebc4c19ce7db16ed0114b3c794814157075872c2fd1d8b1d32d740e346 SHA512 7e1578b1f82549f77b55341c20a973da52018b1539da46f92e4a9d9804906ce5e00312c8a02a6047373e4435e661b2e5fc18f5dfbf2d0563cdf62c40de6a4436
EBUILD btrfs-progs-6.3.1.ebuild 3531 BLAKE2B e639b34fbef79592d1dbe039cf2d13ff29f9cc6a7eee0ced223498050e0c3b6e65ba7214576a81d2bb716b82c27b6c83c353a288381b869a7d5228e1ffecadbd SHA512 96095b964ce0733201bf405b1d3cb3a21637a60b5e1f3fccccc0cdc9c5d5c705c4593afc5598480b8dfc53a3ad4c55ba427354559120b4a14d4d234c8f60872e
EBUILD btrfs-progs-6.3.2.ebuild 3532 BLAKE2B 8bc3fb26e7afd8873018303562b98004eccdbc46dec106722ed53a63ecd8b6aa77b031dceab11c6a6a211030c9297a5e640707c17c6561c71ba2cf7a8abe20a8 SHA512 5a22ce15d0873ef360c64ae52417161d34480d383ce15bd6cf5b0dec179b9a3811e22a976d5916c743215cfc7b24e76eb48a858cd3adfd4c42ec1ade8676fd02
EBUILD btrfs-progs-6.3.3.ebuild 3526 BLAKE2B 757ed0078acbe35c3d43a426062d01c620a4880ba34303a838469a81ae8dec25b4aef7e1c9230d96b14cc47620d50963a935799391bd8f86604cd9aa694fd47c SHA512 90a9c015ba76b8c7675aa6dc2b3ecdf853a99844e89abed0da7dc74a5622687f64ae6d2a732ac1911ec349e90d4979034dad27820447a25e27d362162053b046
EBUILD btrfs-progs-6.5.1.ebuild 3532 BLAKE2B 8bc3fb26e7afd8873018303562b98004eccdbc46dec106722ed53a63ecd8b6aa77b031dceab11c6a6a211030c9297a5e640707c17c6561c71ba2cf7a8abe20a8 SHA512 5a22ce15d0873ef360c64ae52417161d34480d383ce15bd6cf5b0dec179b9a3811e22a976d5916c743215cfc7b24e76eb48a858cd3adfd4c42ec1ade8676fd02
EBUILD btrfs-progs-6.5.2.ebuild 3532 BLAKE2B 8bc3fb26e7afd8873018303562b98004eccdbc46dec106722ed53a63ecd8b6aa77b031dceab11c6a6a211030c9297a5e640707c17c6561c71ba2cf7a8abe20a8 SHA512 5a22ce15d0873ef360c64ae52417161d34480d383ce15bd6cf5b0dec179b9a3811e22a976d5916c743215cfc7b24e76eb48a858cd3adfd4c42ec1ade8676fd02
+EBUILD btrfs-progs-6.5.3.ebuild 3532 BLAKE2B 8bc3fb26e7afd8873018303562b98004eccdbc46dec106722ed53a63ecd8b6aa77b031dceab11c6a6a211030c9297a5e640707c17c6561c71ba2cf7a8abe20a8 SHA512 5a22ce15d0873ef360c64ae52417161d34480d383ce15bd6cf5b0dec179b9a3811e22a976d5916c743215cfc7b24e76eb48a858cd3adfd4c42ec1ade8676fd02
EBUILD btrfs-progs-6.5.ebuild 3614 BLAKE2B 5d03ad29a9cce10d9433cb0d269b9f1c90edbebb796be44f043db456d930cd22f1661240cf6d42f1eda20778981689c1acde559c731d66adf9c20b8bb0a6876b SHA512 35c41c736e330ed30e5a4ae9fd89315e4f158e1a355621c61120c4d62c83cd204863c60736c48326a586baf07c073171f835672fc71b0a8de084a4e9fe989fcd
EBUILD btrfs-progs-9999.ebuild 3532 BLAKE2B 8bc3fb26e7afd8873018303562b98004eccdbc46dec106722ed53a63ecd8b6aa77b031dceab11c6a6a211030c9297a5e640707c17c6561c71ba2cf7a8abe20a8 SHA512 5a22ce15d0873ef360c64ae52417161d34480d383ce15bd6cf5b0dec179b9a3811e22a976d5916c743215cfc7b24e76eb48a858cd3adfd4c42ec1ade8676fd02
MISC metadata.xml 610 BLAKE2B 70361c4d5434a98f73a3d38ed47d7be830783529db6217396f2235cdedd58744fc6e52e4de1994d28184fe9d8aa5d2982c433d47eda1868cfdb79edf0769a620 SHA512 8958c02574adb1395a9d21d9e9ad5db38570b82a1c7211752eb007eecbd0e541e880a060649641f40be877f167e14f278f14d5ef8775766ef9a6fa5d3843dc53
diff --git a/sys-fs/btrfs-progs/btrfs-progs-6.5.3.ebuild b/sys-fs/btrfs-progs/btrfs-progs-6.5.3.ebuild
new file mode 100644
index 000000000000..479ade82c97a
--- /dev/null
+++ b/sys-fs/btrfs-progs/btrfs-progs-6.5.3.ebuild
@@ -0,0 +1,161 @@
+# Copyright 2008-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+inherit bash-completion-r1 python-single-r1 udev
+
+libbtrfs_soname=0
+
+if [[ ${PV} != 9999 ]]; then
+ MY_PV="v${PV/_/-}"
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz"
+
+ if [[ ${PV} != *_rc* ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ fi
+
+ S="${WORKDIR}"/${PN}-${MY_PV}
+else
+ EGIT_REPO_URI="https://github.com/kdave/btrfs-progs.git"
+ EGIT_BRANCH="devel"
+ WANT_LIBTOOL="none"
+ inherit autotools git-r3
+fi
+
+DESCRIPTION="Btrfs filesystem utilities"
+HOMEPAGE="https://btrfs.readthedocs.io/en/latest/"
+
+LICENSE="GPL-2"
+SLOT="0/${libbtrfs_soname}"
+IUSE="+convert python +man reiserfs static static-libs udev +zstd"
+# Could support it with just !systemd => eudev, see mdadm, but let's
+# see if someone asks for it first.
+REQUIRED_USE="static? ( !udev ) python? ( ${PYTHON_REQUIRED_USE} )"
+
+# Tries to mount repaired filesystems
+RESTRICT="test"
+
+RDEPEND="
+ dev-libs/lzo:2=
+ sys-apps/util-linux:=[static-libs(+)?]
+ sys-libs/zlib:=
+ convert? (
+ sys-fs/e2fsprogs:=
+ reiserfs? (
+ >=sys-fs/reiserfsprogs-3.6.27
+ )
+ )
+ python? ( ${PYTHON_DEPS} )
+ udev? ( virtual/libudev:= )
+ zstd? ( app-arch/zstd:= )
+"
+DEPEND="
+ ${RDEPEND}
+ >=sys-kernel/linux-headers-5.10
+ convert? ( sys-apps/acl )
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ ')
+ )
+ static? (
+ dev-libs/lzo:2[static-libs(+)]
+ sys-apps/util-linux:0[static-libs(+)]
+ sys-libs/zlib:0[static-libs(+)]
+ convert? (
+ sys-fs/e2fsprogs[static-libs(+)]
+ reiserfs? (
+ >=sys-fs/reiserfsprogs-3.6.27[static-libs(+)]
+ )
+ )
+ zstd? ( app-arch/zstd[static-libs(+)] )
+ )
+"
+BDEPEND="
+ virtual/pkgconfig
+ man? ( dev-python/sphinx )
+"
+
+if [[ ${PV} == 9999 ]]; then
+ BDEPEND+=" sys-devel/gnuconfig"
+fi
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ if [[ ${PV} == 9999 ]]; then
+ AT_M4DIR="m4" eautoreconf
+
+ mkdir config || die
+ local automakedir="$(autotools_run_tool --at-output automake --print-libdir)"
+ [[ -e ${automakedir} ]] || die "Could not locate automake directory"
+
+ ln -s "${automakedir}"/install-sh config/install-sh || die
+ ln -s "${BROOT}"/usr/share/gnuconfig/config.guess config/config.guess || die
+ ln -s "${BROOT}"/usr/share/gnuconfig/config.sub config/config.sub || die
+ fi
+}
+
+src_configure() {
+ local myeconfargs=(
+ --bindir="${EPREFIX}"/sbin
+
+ --enable-lzo
+ --disable-experimental
+ $(use_enable convert)
+ $(use_enable man documentation)
+ $(use_enable elibc_glibc backtrace)
+ $(use_enable python)
+ $(use_enable static-libs static)
+ $(use_enable udev libudev)
+ $(use_enable zstd)
+
+ # Could support libgcrypt, libsodium, libkcapi
+ --with-crypto=builtin
+ --with-convert=ext2$(usex reiserfs ',reiserfs' '')
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake V=1 all $(usev static)
+}
+
+src_test() {
+ emake -j1 -C tests V=1 test
+
+ if use python ; then
+ cd libbtrfsutil/python || die
+
+ local -x LD_LIBRARY_PATH="${S}:libbtrfsutil/python:${LD_LIBRARY_PATH}"
+ ${EPYTHON} -m unittest tests/test_*.py || die "Tests failed with ${EPYTHON}"
+ fi
+}
+
+src_install() {
+ local makeargs=(
+ $(usev python install_python)
+ $(usev static install-static)
+ )
+
+ emake V=1 DESTDIR="${D}" install "${makeargs[@]}"
+
+ newbashcomp btrfs-completion btrfs
+
+ use python && python_optimize
+}
+
+pkg_postinst() {
+ udev_reload
+}
+
+pkg_postrm() {
+ udev_reload
+}
diff --git a/sys-fs/f2fs-tools/Manifest b/sys-fs/f2fs-tools/Manifest
index 3f8e9837662f..8829f401d3de 100644
--- a/sys-fs/f2fs-tools/Manifest
+++ b/sys-fs/f2fs-tools/Manifest
@@ -1,4 +1,6 @@
+AUX f2fs-tools-1.16.0-musl-1.2.4-lfs.patch 11468 BLAKE2B e7149c9c895c108cd90b729e5201fd41aa2a12ff3d4fcc13709015fdc8529f8af5e1d4380966096e4f7a425341d7b1056348b4cc3e35dd113875b882b70a3179 SHA512 05619636cdbb1c602953eee5073c06295adcbe52cca0f57449937ff7b1d96e3c61e3f436858a70399cf4d615b7e8ead21ee71d1a031d481d705e045dd8820dfc
DIST f2fs-tools-1.16.0.tar.gz 265507 BLAKE2B a4fb94ff879198652a2922a0101b7e34aad156c3536e5a20c1cb2e36a6a734d92d3f97b2570eb702d029ef1d6c03d6123113fc1aa5658ba979401e0691b7b447 SHA512 ea198cebf7c5bb0c42c9b53bc80484495c403b1ed1354eb7cb7b4f63ed9a5c81653a76eaf1bc35067171fa5fd99b1564178c5440c21b6b025f4e83b9def82680
+EBUILD f2fs-tools-1.16.0-r1.ebuild 1208 BLAKE2B e88169cc6a017e591f5580bc96012963273caffff1e6ab949f1cf1b8519173cbaf53b55554ecf194ce4e2b04d36ccf5292e0493ba923ec1c957a99b44f6e338c SHA512 a1cf2c9e911bd0427c684fef5fd4349ba94c118dd84a3f8813bf70e99d00800371be7b1edbb58ea6ab0b4eb498a985d75defc9f46090d478c924a6f42405fb9e
EBUILD f2fs-tools-1.16.0.ebuild 1148 BLAKE2B 89db0546409f639f727197ca0ff518bbe401cd45a49062c73586f9fe1eca0ddaddca83b8e68540e15ed0832a78bca638aae9cb747f9232b23eb643a3778c2332 SHA512 6d32619a2a8bdb8ef630c04e24eceb6353e4bec7cca53b47cf8a79a68ed69c2f31f47c3f764e2b91b4f9efe6ae89f8679be04c16a6aa1da647786ab588f5f805
EBUILD f2fs-tools-9999.ebuild 1087 BLAKE2B 0c99aaa8bd3f97ef49676cf6dba244704a6605fcfe8998e24816e764e80e86cd42d8c1b6518fddcde670be18eb1de289b4d53e0e6fbf8152d05ef504a1aacca3 SHA512 5b9ff6f624bbac4ce7d903424ca28fbaf73de7efb3e06d7fdb24e5dbfba058e19b22874288af2a27f9e9475f0f2d11c30efd5ee2adfdccbe3557a958db1a24d2
MISC metadata.xml 505 BLAKE2B 97772236b6d7113c38a9d8920ac2b0d949ee55f9971a94caa8b4ebfb1e91a6d6bffc97702b4f952867afb8cffea7972ef17f1ba8f390f4195a465aa90c2f915b SHA512 7a80d22b56aeb5f59203cb2853a63d8a3b1af955051d1c307ce5af2b3c3ae999481a37938b674532807dbffa715a725a384905995532d72d18761b3732540b76
diff --git a/sys-fs/f2fs-tools/f2fs-tools-1.16.0-r1.ebuild b/sys-fs/f2fs-tools/f2fs-tools-1.16.0-r1.ebuild
new file mode 100644
index 000000000000..8a7ff5b69fa2
--- /dev/null
+++ b/sys-fs/f2fs-tools/f2fs-tools-1.16.0-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Tools for Flash-Friendly File System (F2FS)"
+HOMEPAGE="https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/about/"
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/${PN}.git"
+ EGIT_BRANCH="dev"
+else
+ SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/${PN}.git/snapshot/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0/10"
+IUSE="lz4 lzo selinux"
+
+RDEPEND="
+ lz4? ( app-arch/lz4:= )
+ lzo? ( dev-libs/lzo:2 )
+ sys-apps/util-linux
+ selinux? ( sys-libs/libselinux )
+ elibc_musl? ( sys-libs/queue-standalone )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-musl-1.2.4-lfs.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ # This is required to install to /sbin, bug #481110
+ --bindir="${EPREFIX}"/sbin
+ $(use_with lz4)
+ $(use_with lzo lzo2)
+ $(use_with selinux)
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ find "${ED}" -name "*.la" -delete || die
+}
diff --git a/sys-fs/f2fs-tools/files/f2fs-tools-1.16.0-musl-1.2.4-lfs.patch b/sys-fs/f2fs-tools/files/f2fs-tools-1.16.0-musl-1.2.4-lfs.patch
new file mode 100644
index 000000000000..03be41400c20
--- /dev/null
+++ b/sys-fs/f2fs-tools/files/f2fs-tools-1.16.0-musl-1.2.4-lfs.patch
@@ -0,0 +1,403 @@
+https://bugs.gentoo.org/908664
+https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/commit/?id=b15b6cc56ac7764be17acbdbf96448f388992adc
+
+From b15b6cc56ac7764be17acbdbf96448f388992adc Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <wbx@openadk.org>
+Date: Wed, 23 Aug 2023 15:41:28 +0200
+Subject: f2fs-tools: convert to lseek() and kill lseek64
+
+This patch replaces lseek64 with lseek() having #define _FILE_OFFSET_BITS 64.
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -187,8 +187,6 @@ AC_CHECK_FUNCS_ONCE([
+ getmntent
+ getuid
+ keyctl
+- llseek
+- lseek64
+ memset
+ setmntent
+ clock_gettime
+--- a/fsck/Makefile.am
++++ b/fsck/Makefile.am
+@@ -1,7 +1,7 @@
+ ## Makefile.am
+
+ AM_CPPFLAGS = ${libuuid_CFLAGS} -I$(top_srcdir)/include
+-AM_CFLAGS = -Wall
++AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64
+ sbin_PROGRAMS = fsck.f2fs
+ noinst_HEADERS = common.h dict.h dqblk_v2.h f2fs.h fsck.h node.h quotaio.h \
+ quotaio_tree.h quotaio_v2.h xattr.h compress.h
+--- a/include/android_config.h
++++ b/include/android_config.h
+@@ -30,8 +30,6 @@
+ #define HAVE_FSTAT 1
+ #define HAVE_FSTAT64 1
+ #define HAVE_GETMNTENT 1
+-#define HAVE_LLSEEK 1
+-#define HAVE_LSEEK64 1
+ #define HAVE_MEMSET 1
+ #define HAVE_SELINUX_ANDROID_H 1
+ #define HAVE_SETMNTENT 1
+@@ -67,7 +65,6 @@
+ #define HAVE_FSTAT 1
+ #define HAVE_FSTAT64 1
+ #define HAVE_GETMNTENT 1
+-#define HAVE_LLSEEK 1
+ #define HAVE_MEMSET 1
+ #define HAVE_SPARSE_SPARSE_H 1
+ #define HAVE_LIBLZ4 1
+@@ -78,6 +75,5 @@
+ #endif
+
+ #if defined(_WIN32)
+-#define HAVE_LSEEK64
+ #define HAVE_SPARSE_SPARSE_H 1
+ #endif
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -3,7 +3,7 @@
+ lib_LTLIBRARIES = libf2fs.la
+
+ libf2fs_la_SOURCES = libf2fs.c libf2fs_io.c libf2fs_zoned.c nls_utf8.c
+-libf2fs_la_CFLAGS = -Wall
++libf2fs_la_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64
+ libf2fs_la_CPPFLAGS = -I$(top_srcdir)/include
+ libf2fs_la_LDFLAGS = -version-info $(LIBF2FS_CURRENT):$(LIBF2FS_REVISION):$(LIBF2FS_AGE)
+
+--- a/lib/libf2fs.c
++++ b/lib/libf2fs.c
+@@ -6,9 +6,6 @@
+ *
+ * Dual licensed under the GPL or LGPL version 2 licenses.
+ */
+-#define _LARGEFILE64_SOURCE
+-#define _FILE_OFFSET_BITS 64
+-
+ #include <f2fs_fs.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+--- a/lib/libf2fs_io.c
++++ b/lib/libf2fs_io.c
+@@ -11,8 +11,6 @@
+ *
+ * Dual licensed under the GPL or LGPL version 2 licenses.
+ */
+-#define _LARGEFILE64_SOURCE
+-
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -67,22 +65,13 @@ static int __get_device_fd(__u64 *offset)
+ return -1;
+ }
+
+-#ifndef HAVE_LSEEK64
+-typedef off_t off64_t;
+-
+-static inline off64_t lseek64(int fd, __u64 offset, int set)
+-{
+- return lseek(fd, offset, set);
+-}
+-#endif
+-
+ /* ---------- dev_cache, Least Used First (LUF) policy ------------------- */
+ /*
+ * Least used block will be the first victim to be replaced when max hash
+ * collision exceeds
+ */
+ static bool *dcache_valid; /* is the cached block valid? */
+-static off64_t *dcache_blk; /* which block it cached */
++static off_t *dcache_blk; /* which block it cached */
+ static uint64_t *dcache_lastused; /* last used ticks for cache entries */
+ static char *dcache_buf; /* cached block data */
+ static uint64_t dcache_usetick; /* current use tick */
+@@ -172,7 +161,7 @@ static int dcache_alloc_all(long n)
+ {
+ if (n <= 0)
+ return -1;
+- if ((dcache_blk = (off64_t *) malloc(sizeof(off64_t) * n)) == NULL
++ if ((dcache_blk = (off_t *) malloc(sizeof(off_t) * n)) == NULL
+ || (dcache_lastused = (uint64_t *)
+ malloc(sizeof(uint64_t) * n)) == NULL
+ || (dcache_buf = (char *) malloc (F2FS_BLKSIZE * n)) == NULL
+@@ -257,7 +246,7 @@ static inline long dcache_relocate(long entry, int n)
+ dcache_config.num_cache_entry;
+ }
+
+-static long dcache_find(off64_t blk)
++static long dcache_find(off_t blk)
+ {
+ register long n = dcache_config.num_cache_entry;
+ register unsigned m = dcache_config.max_hash_collision;
+@@ -278,10 +267,10 @@ static long dcache_find(off64_t blk)
+ }
+
+ /* Physical read into cache */
+-static int dcache_io_read(int fd, long entry, off64_t offset, off64_t blk)
++static int dcache_io_read(int fd, long entry, off_t offset, off_t blk)
+ {
+- if (lseek64(fd, offset, SEEK_SET) < 0) {
+- MSG(0, "\n lseek64 fail.\n");
++ if (lseek(fd, offset, SEEK_SET) < 0) {
++ MSG(0, "\n lseek fail.\n");
+ return -1;
+ }
+ if (read(fd, dcache_buf + entry * F2FS_BLKSIZE, F2FS_BLKSIZE) < 0) {
+@@ -308,12 +297,12 @@ static int dcache_io_read(int fd, long entry, off64_t offset, off64_t blk)
+ * 1: cache not available (uninitialized)
+ * -1: error
+ */
+-static int dcache_update_rw(int fd, void *buf, off64_t offset,
++static int dcache_update_rw(int fd, void *buf, off_t offset,
+ size_t byte_count, bool is_write)
+ {
+- off64_t blk;
++ off_t blk;
+ int addr_in_blk;
+- off64_t start;
++ off_t start;
+
+ if (!dcache_initialized)
+ dcache_init(); /* auto initialize */
+@@ -377,13 +366,13 @@ static int dcache_update_rw(int fd, void *buf, off64_t offset,
+ * return value: 1: cache not available
+ * 0: success, -1: I/O error
+ */
+-int dcache_update_cache(int fd, void *buf, off64_t offset, size_t count)
++int dcache_update_cache(int fd, void *buf, off_t offset, size_t count)
+ {
+ return dcache_update_rw(fd, buf, offset, count, true);
+ }
+
+ /* handles read into cache + read into buffer */
+-int dcache_read(int fd, void *buf, off64_t offset, size_t count)
++int dcache_read(int fd, void *buf, off_t offset, size_t count)
+ {
+ return dcache_update_rw(fd, buf, offset, count, false);
+ }
+@@ -395,7 +384,7 @@ int dev_read_version(void *buf, __u64 offset, size_t len)
+ {
+ if (c.sparse_mode)
+ return 0;
+- if (lseek64(c.kd, (off64_t)offset, SEEK_SET) < 0)
++ if (lseek(c.kd, (off_t)offset, SEEK_SET) < 0)
+ return -1;
+ if (read(c.kd, buf, len) < 0)
+ return -1;
+@@ -534,10 +523,10 @@ int dev_read(void *buf, __u64 offset, size_t len)
+
+ /* err = 1: cache not available, fall back to non-cache R/W */
+ /* err = 0: success, err=-1: I/O error */
+- err = dcache_read(fd, buf, (off64_t)offset, len);
++ err = dcache_read(fd, buf, (off_t)offset, len);
+ if (err <= 0)
+ return err;
+- if (lseek64(fd, (off64_t)offset, SEEK_SET) < 0)
++ if (lseek(fd, (off_t)offset, SEEK_SET) < 0)
+ return -1;
+ if (read(fd, buf, len) < 0)
+ return -1;
+@@ -580,9 +569,9 @@ int dev_write(void *buf, __u64 offset, size_t len)
+ * dcache_update_cache() just update cache, won't do I/O.
+ * Thus even no error, we need normal non-cache I/O for actual write
+ */
+- if (dcache_update_cache(fd, buf, (off64_t)offset, len) < 0)
++ if (dcache_update_cache(fd, buf, (off_t)offset, len) < 0)
+ return -1;
+- if (lseek64(fd, (off64_t)offset, SEEK_SET) < 0)
++ if (lseek(fd, (off_t)offset, SEEK_SET) < 0)
+ return -1;
+ if (write(fd, buf, len) < 0)
+ return -1;
+@@ -596,7 +585,7 @@ int dev_write_block(void *buf, __u64 blk_addr)
+
+ int dev_write_dump(void *buf, __u64 offset, size_t len)
+ {
+- if (lseek64(c.dump_fd, (off64_t)offset, SEEK_SET) < 0)
++ if (lseek(c.dump_fd, (off_t)offset, SEEK_SET) < 0)
+ return -1;
+ if (write(c.dump_fd, buf, len) < 0)
+ return -1;
+@@ -618,7 +607,7 @@ int dev_fill(void *buf, __u64 offset, size_t len)
+ /* Only allow fill to zero */
+ if (*((__u8*)buf))
+ return -1;
+- if (lseek64(fd, (off64_t)offset, SEEK_SET) < 0)
++ if (lseek(fd, (off_t)offset, SEEK_SET) < 0)
+ return -1;
+ if (write(fd, buf, len) < 0)
+ return -1;
+--- a/lib/libf2fs_zoned.c
++++ b/lib/libf2fs_zoned.c
+@@ -6,7 +6,6 @@
+ *
+ * Dual licensed under the GPL or LGPL version 2 licenses.
+ */
+-#define _LARGEFILE64_SOURCE
+
+ #include <f2fs_fs.h>
+ #include <stdio.h>
+--- a/mkfs/Makefile.am
++++ b/mkfs/Makefile.am
+@@ -1,7 +1,7 @@
+ ## Makefile.am
+
+ AM_CPPFLAGS = ${libuuid_CFLAGS} ${libblkid_CFLAGS} -I$(top_srcdir)/include
+-AM_CFLAGS = -Wall -DWITH_BLKDISCARD
++AM_CFLAGS = -Wall -DWITH_BLKDISCARD -D_FILE_OFFSET_BITS=64
+ sbin_PROGRAMS = mkfs.f2fs
+ noinst_HEADERS = f2fs_format_utils.h
+ include_HEADERS = $(top_srcdir)/include/f2fs_fs.h
+@@ -10,7 +10,7 @@ mkfs_f2fs_LDADD = ${libuuid_LIBS} ${libblkid_LIBS} $(top_builddir)/lib/libf2fs.l
+
+ lib_LTLIBRARIES = libf2fs_format.la
+ libf2fs_format_la_SOURCES = f2fs_format_main.c f2fs_format.c f2fs_format_utils.c
+-libf2fs_format_la_CFLAGS = -DWITH_BLKDISCARD
++libf2fs_format_la_CFLAGS = -DWITH_BLKDISCARD -D_FILE_OFFSET_BITS=64
+ libf2fs_format_la_LDFLAGS = ${libblkid_LIBS} ${libuuid_LIBS} -L$(top_builddir)/lib -lf2fs \
+ -version-info $(FMT_CURRENT):$(FMT_REVISION):$(FMT_AGE)
+
+--- a/mkfs/f2fs_format.c
++++ b/mkfs/f2fs_format.c
+@@ -6,8 +6,6 @@
+ *
+ * Dual licensed under the GPL or LGPL version 2 licenses.
+ */
+-#define _LARGEFILE64_SOURCE
+-
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <fcntl.h>
+--- a/mkfs/f2fs_format_main.c
++++ b/mkfs/f2fs_format_main.c
+@@ -6,8 +6,6 @@
+ *
+ * Dual licensed under the GPL or LGPL version 2 licenses.
+ */
+-#define _LARGEFILE64_SOURCE
+-
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <fcntl.h>
+--- a/mkfs/f2fs_format_utils.c
++++ b/mkfs/f2fs_format_utils.c
+@@ -6,20 +6,10 @@
+ *
+ * Dual licensed under the GPL or LGPL version 2 licenses.
+ */
+-#ifndef _LARGEFILE_SOURCE
+-#define _LARGEFILE_SOURCE
+-#endif
+-#ifndef _LARGEFILE64_SOURCE
+-#define _LARGEFILE64_SOURCE
+-#endif
+ #ifndef _GNU_SOURCE
+ #define _GNU_SOURCE
+ #endif
+
+-#ifndef _FILE_OFFSET_BITS
+-#define _FILE_OFFSET_BITS 64
+-#endif
+-
+ #include <f2fs_fs.h>
+
+ #include <stdio.h>
+--- a/mkfs/f2fs_format_utils.h
++++ b/mkfs/f2fs_format_utils.h
+@@ -6,8 +6,6 @@
+ *
+ * Dual licensed under the GPL or LGPL version 2 licenses.
+ */
+-#define _LARGEFILE64_SOURCE
+-
+ #include "f2fs_fs.h"
+
+ extern struct f2fs_configuration c;
+--- a/tools/Makefile.am
++++ b/tools/Makefile.am
+@@ -1,7 +1,7 @@
+ ## Makefile.am
+
+ AM_CPPFLAGS = ${libuuid_CFLAGS} -I$(top_srcdir)/include
+-AM_CFLAGS = -Wall
++AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64
+ sbin_PROGRAMS =
+ if !WINDOWS
+ sbin_PROGRAMS += fibmap.f2fs parse.f2fs
+--- a/tools/f2fs_io/Makefile.am
++++ b/tools/f2fs_io/Makefile.am
+@@ -2,7 +2,7 @@
+
+ if LINUX
+ AM_CPPFLAGS = -I$(top_srcdir)/include
+-AM_CFLAGS = -Wall
++AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64
+ sbin_PROGRAMS = f2fs_io
+ f2fs_io_SOURCES = f2fs_io.c
+ endif
+--- a/tools/f2fs_io/f2fs_io.c
++++ b/tools/f2fs_io/f2fs_io.c
+@@ -9,12 +9,6 @@
+ #ifndef _GNU_SOURCE
+ #define _GNU_SOURCE
+ #endif
+-#ifndef _LARGEFILE_SOURCE
+-#define _LARGEFILE_SOURCE
+-#endif
+-#ifndef _LARGEFILE64_SOURCE
+-#define _LARGEFILE64_SOURCE
+-#endif
+ #ifndef O_LARGEFILE
+ #define O_LARGEFILE 0
+ #endif
+--- a/tools/f2fs_io_parse.c
++++ b/tools/f2fs_io_parse.c
+@@ -8,7 +8,6 @@
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+-#define _LARGEFILE64_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+--- a/tools/f2fscrypt.c
++++ b/tools/f2fscrypt.c
+@@ -7,15 +7,6 @@
+ * Authors: Michael Halcrow <mhalcrow@google.com>,
+ * Ildar Muslukhov <ildarm@google.com>
+ */
+-
+-#ifndef _LARGEFILE_SOURCE
+-#define _LARGEFILE_SOURCE
+-#endif
+-
+-#ifndef _LARGEFILE64_SOURCE
+-#define _LARGEFILE64_SOURCE
+-#endif
+-
+ #ifndef _GNU_SOURCE
+ #define _GNU_SOURCE
+ #endif
+--- a/tools/fibmap.c
++++ b/tools/fibmap.c
+@@ -1,13 +1,6 @@
+ #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
+ #define _XOPEN_SOURCE 600
+ #define _DARWIN_C_SOURCE
+-#define _FILE_OFFSET_BITS 64
+-#ifndef _LARGEFILE_SOURCE
+-#define _LARGEFILE_SOURCE
+-#endif
+-#ifndef _LARGEFILE64_SOURCE
+-#define _LARGEFILE64_SOURCE
+-#endif
+ #ifndef _GNU_SOURCE
+ #define _GNU_SOURCE
+ #endif
+--
+cgit