diff options
author | 2022-06-21 22:50:33 +0000 | |
---|---|---|
committer | 2022-07-14 22:32:06 +0200 | |
commit | 1f253042a8653e56b1cc6ae0df2d896d38cd7ecb (patch) | |
tree | 5fd9b9e1e8c5469d2e4f5d602ee9cb68889a72da /kde-apps/filelight/files/filelight-22.04.3-fix_musl_dev_bsize.patch | |
parent | dev-python/aiohttp: Stabilize 3.8.1-r1 ppc64, #858077 (diff) | |
download | gentoo-1f253042a8653e56b1cc6ae0df2d896d38cd7ecb.tar.gz gentoo-1f253042a8653e56b1cc6ae0df2d896d38cd7ecb.tar.bz2 gentoo-1f253042a8653e56b1cc6ae0df2d896d38cd7ecb.zip |
kde-apps/filelight: fix build and running on musl
Filelight has two issues with musl. One is a SIGSEGV regarding the
sincos implementation and the other is S_BLKSIZE not being defined.
*1: The SIGSEGV is resolved upstream and with this patch musl will just use the native sincos.
*2: DEV_BSIZE is the exact same thing as S_BLKSIZE, so use that instead.
The DEV_BSIZE issue is PR:ed upstreamed but there are issues with it since Windows does not have sys/param.h.
https://invent.kde.org/utilities/filelight/-/merge_requests/42/
https://invent.kde.org/utilities/filelight/-/merge_requests/39/
Signed-off-by: Alfred Persson Forsberg <cat@catcream.org>
squash
Closes: https://github.com/gentoo/gentoo/pull/26029
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-apps/filelight/files/filelight-22.04.3-fix_musl_dev_bsize.patch')
-rw-r--r-- | kde-apps/filelight/files/filelight-22.04.3-fix_musl_dev_bsize.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/kde-apps/filelight/files/filelight-22.04.3-fix_musl_dev_bsize.patch b/kde-apps/filelight/files/filelight-22.04.3-fix_musl_dev_bsize.patch new file mode 100644 index 000000000000..1b428b0582f5 --- /dev/null +++ b/kde-apps/filelight/files/filelight-22.04.3-fix_musl_dev_bsize.patch @@ -0,0 +1,66 @@ +https://invent.kde.org/utilities/filelight/-/merge_requests/42 +https://invent.kde.org/utilities/filelight/-/merge_requests/42/diffs?commit_id=f35d454513f2fc39fea0a5af7c94977c1ffb37aa + +DEV_BSIZE and S_BLKSIZE represent the same thing, but S_BLKSIZE isn't defined in musl libc, so use DEV_BSIZE instead. +--- + autotests/directoryIteratorTest.cpp | 8 ++++---- + src/posixWalker.cpp | 2 +- + src/posixWalker.h | 1 + + 3 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/autotests/directoryIteratorTest.cpp b/autotests/directoryIteratorTest.cpp +index d50c32b..fece8dd 100644 +--- a/autotests/directoryIteratorTest.cpp ++++ b/autotests/directoryIteratorTest.cpp +@@ -60,9 +60,9 @@ private Q_SLOTS: + #ifdef Q_OS_WINDOWS + QCOMPARE(file.size, 7682); + #elif defined(Q_OS_FREEBSD) +- QCOMPARE(file.size, 1 * S_BLKSIZE); ++ QCOMPARE(file.size, 1 * DEV_BSIZE); + #else +- QCOMPARE(file.size, 16 * S_BLKSIZE); ++ QCOMPARE(file.size, 16 * DEV_BSIZE); + #endif + + if (withSymlink) { +@@ -83,9 +83,9 @@ private Q_SLOTS: + #ifdef Q_OS_WINDOWS + QCOMPARE(symlink.size, 7682); + #elif defined(Q_OS_FREEBSD) +- QCOMPARE(file.size, 1 * S_BLKSIZE); ++ QCOMPARE(file.size, 1 * DEV_BSIZE); + #else +- QCOMPARE(symlink.size, 16 * S_BLKSIZE); ++ QCOMPARE(symlink.size, 16 * DEV_BSIZE); + #endif + } + } +diff --git a/src/posixWalker.cpp b/src/posixWalker.cpp +index be6935f..6538408 100644 +--- a/src/posixWalker.cpp ++++ b/src/posixWalker.cpp +@@ -99,7 +99,7 @@ void POSIXWalker::next() + S_ISFIFO(statbuf.st_mode) || S_ISSOCK(statbuf.st_mode); + m_entry.isDir = S_ISDIR(statbuf.st_mode); + m_entry.isFile = S_ISREG(statbuf.st_mode); +- m_entry.size = statbuf.st_blocks * S_BLKSIZE; ++ m_entry.size = statbuf.st_blocks * DEV_BSIZE; + break; + } + } +diff --git a/src/posixWalker.h b/src/posixWalker.h +index 4a78d52..ba72a98 100644 +--- a/src/posixWalker.h ++++ b/src/posixWalker.h +@@ -7,6 +7,7 @@ + #include <fcntl.h> + #include <sys/stat.h> + #include <sys/types.h> ++#include <sys/param.h> + #include <unistd.h> + + #include <cerrno> +-- +2.35.1 + |