diff options
author | brahmajit das <listout@protonmail.com> | 2022-08-13 22:49:22 +0530 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-08-13 18:22:06 +0100 |
commit | 8ac6cf298bdc0ca9b2ff48caaf63b2fdbcac8223 (patch) | |
tree | cd8137e294d83be676ee90937bf225cf13f79f90 /dev-util/watchman | |
parent | net-fs/libnfs: add 5.0.2 (diff) | |
download | gentoo-8ac6cf298bdc0ca9b2ff48caaf63b2fdbcac8223.tar.gz gentoo-8ac6cf298bdc0ca9b2ff48caaf63b2fdbcac8223.tar.bz2 gentoo-8ac6cf298bdc0ca9b2ff48caaf63b2fdbcac8223.zip |
dev-util/watchman: Fix __fsword_t type not defined on musl
__fsword_t is a glibc specific internal type, hence cannot be used on musl.
According to the fstatfs man page [1], we can use unsigned integer instead of
__fsword_t. But we are using unsigned long due the definition of
__FSWORD_T_TYPE seemes to be long [2].
[1]: https://man7.org/linux/man-pages/man2/fstatfs.2.html [2]:
[2]: https://code.woboq.org/qt5/include/bits/typesizes.h.html#46
Signed-off-by: brahmajit das <listout@protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/26850
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/watchman')
-rw-r--r-- | dev-util/watchman/files/watchman-2022.08.08.00-musl-fsword-fix.patch | 20 | ||||
-rw-r--r-- | dev-util/watchman/watchman-2022.08.08.00.ebuild | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/dev-util/watchman/files/watchman-2022.08.08.00-musl-fsword-fix.patch b/dev-util/watchman/files/watchman-2022.08.08.00-musl-fsword-fix.patch new file mode 100644 index 000000000000..1d7a2feadc79 --- /dev/null +++ b/dev-util/watchman/files/watchman-2022.08.08.00-musl-fsword-fix.patch @@ -0,0 +1,20 @@ +# dev-util/watchman: Fix __fsword_t type not defined on musl +# +# __fsword_t is a glibc specific internal type, hence cannot be used on musl. +# According to the fstatfs man page [1], we can use unsigned integer instead of +# __fsword_t. But we are using unsigned long due the definition of +# __FSWORD_T_TYPE seemes to be long [2]. +# +# [1]: https://man7.org/linux/man-pages/man2/fstatfs.2.html [2]: +# [2]: https://code.woboq.org/qt5/include/bits/typesizes.h.html#46 +--- a/watchman/fs/FSDetect.cpp ++++ b/watchman/fs/FSDetect.cpp +@@ -143,7 +143,7 @@ w_string w_fstype(const char* path) { + + // Unfortunately the FUSE magic number is not defined in linux/magic.h, + // and is only available in the Linux source code in fs/fuse/inode.c +- constexpr __fsword_t FUSE_MAGIC_NUMBER = 0x65735546; ++ constexpr unsigned long FUSE_MAGIC_NUMBER = 0x65735546; + + if (statfs(path, &sfs) == 0) { + switch (sfs.f_type) { diff --git a/dev-util/watchman/watchman-2022.08.08.00.ebuild b/dev-util/watchman/watchman-2022.08.08.00.ebuild index f8639a109c5d..030a28e8ed05 100644 --- a/dev-util/watchman/watchman-2022.08.08.00.ebuild +++ b/dev-util/watchman/watchman-2022.08.08.00.ebuild @@ -139,6 +139,7 @@ DEPEND="${RDEPEND} PATCHES=( "${FILESDIR}"/${PN}-2022.07.04.00-python-working-dir.patch "${FILESDIR}"/${PN}-2022.02.28.00-libatomic.patch + "${FILESDIR}"/${PN}-2022.08.08.00-musl-fsword-fix.patch ) # Rust utility |