sal/osl/unx/file.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit 434065478d35fe8e144aec916ac06438c0150270 Author: Stephan Bergmann <stephan.bergm...@allotropia.de> AuthorDate: Fri Mar 8 12:47:23 2024 +0100 Commit: Stephan Bergmann <stephan.bergm...@allotropia.de> CommitDate: Fri Mar 8 16:29:38 2024 +0100 Avoid mentioning Glibc-internal type __fsword_t ...and clean up the use of macros here Change-Id: Iede9ff705992d5e229b44b48cd88f5b495f6cee4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164571 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de> diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx index 5c4069cae2de..b15fe963605f 100644 --- a/sal/osl/unx/file.cxx +++ b/sal/osl/unx/file.cxx @@ -39,6 +39,7 @@ #include <fcntl.h> #include <limits> #include <limits.h> +#include <utility> #include <string.h> #include <pthread.h> @@ -67,9 +68,9 @@ #ifdef LINUX #include <sys/vfs.h> // As documented by the kernel -#define SMB_SUPER_MAGIC static_cast<__fsword_t>(0x517B) -#define CIFS_SUPER_MAGIC static_cast<__fsword_t>(0xFF534D42) -#define SMB2_SUPER_MAGIC static_cast<__fsword_t>(0xFE534D42) +constexpr decltype(std::declval<struct statfs>().f_type) SMB_SUPER_MAGIC = 0x517B; +constexpr decltype(std::declval<struct statfs>().f_type) CIFS_SUPER_MAGIC = 0xFF534D42; +constexpr decltype(std::declval<struct statfs>().f_type) SMB2_SUPER_MAGIC = 0xFE534D42; #endif namespace {