diff options
Diffstat (limited to 'sys-process/btop/files/btop-1.2.13-musl-1.2.4-lfs64.patch')
-rw-r--r-- | sys-process/btop/files/btop-1.2.13-musl-1.2.4-lfs64.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sys-process/btop/files/btop-1.2.13-musl-1.2.4-lfs64.patch b/sys-process/btop/files/btop-1.2.13-musl-1.2.4-lfs64.patch new file mode 100644 index 000000000000..e91fa7d7de9c --- /dev/null +++ b/sys-process/btop/files/btop-1.2.13-musl-1.2.4-lfs64.patch @@ -0,0 +1,39 @@ +Fix for building on musl 1.2.4 and above due to deprecation of LFS64 interfaces. + +Bug: https://bugs.gentoo.org/908670 +Upstream Commit: https://github.com/aristocratos/btop/commit/7e50b03e391a346b2b6ce92be332c58d91f75a000w + +With hunks from: +From af7d5086fce8d995f3f8b10677d107a1124a12bf Mon Sep 17 00:00:00 2001 +From: "Jakob P. Liljenberg" <admin@qvantnet.com> +Date: Thu, 15 Jun 2023 17:45:05 +0200 +Subject: [PATCH] Merge pull request #510 from nobounce/LLVM +--- a/src/linux/btop_collect.cpp ++++ b/src/linux/btop_collect.cpp +@@ -1079,9 +1079,9 @@ namespace Mem { + bool new_ignored = false; + for (auto& [mountpoint, disk] : disks) { + if (std::error_code ec; not fs::exists(mountpoint, ec) or v_contains(ignore_list, mountpoint)) continue; +- struct statvfs64 vfs; +- if (statvfs64(mountpoint.c_str(), &vfs) < 0) { +- Logger::warning("Failed to get disk/partition stats for mount \""+ mountpoint + "\" with statvfs64 error code: " + to_string(errno) + ". Ignoring..."); ++ struct statvfs vfs; ++ if (statvfs(mountpoint.c_str(), &vfs) < 0) { ++ Logger::warning("Failed to get disk/partition stats for mount \""+ mountpoint + "\" with statvfs error code: " + to_string(errno) + ". Ignoring..."); + ignore_list.push_back(mountpoint); + new_ignored = true; + continue; +--- a/Makefile ++++ b/Makefile +@@ -130,8 +156,8 @@ override GOODFLAGS := $(foreach flag,$(TESTFLAGS),$(strip $(shell echo "int main + #? Flags, Libraries and Includes + override REQFLAGS := -std=c++20 + WARNFLAGS := -Wall -Wextra -pedantic + OPTFLAGS := -O2 -ftree-loop-vectorize -flto=$(THREADS) +-LDCXXFLAGS := -pthread -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS $(GOODFLAGS) $(ADDFLAGS) ++LDCXXFLAGS := -pthread -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -D_FILE_OFFSET_BITS=64 $(GOODFLAGS) $(ADDFLAGS) + override CXXFLAGS += $(REQFLAGS) $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS) + override LDFLAGS += $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS) + INC := -I$(INCDIR) -I$(SRCDIR) +-- +2.41.0 |