[PATCH] Blind fix for Linux 32-bit builds
authorStephan Bergmann <stephan.bergmann@allotropia.de>
Fri, 8 Mar 2024 07:38:44 +0000 (08:38 +0100)
committerRene Engelhard <rene@debian.org>
Wed, 13 Aug 2025 15:35:20 +0000 (17:35 +0200)
commit5ccb5f19667d40df3803d7f97fc9ced6214a91cb
treed844f9d41b4826712877e2b8b847f0d5e547aafe
parentf1e3accc127bef96a542ce9fcc388823ee489bdc
[PATCH] Blind fix for Linux 32-bit builds

...which, according to
<https://lists.freedesktop.org/archives/libreoffice/2024-March/091666.html> "32
bit build failure (smb, narrowing)", started to fail with

> /<<PKGBUILDDIR>>/sal/osl/unx/file.cxx: In function ‘void osl_file_adjustLockFlags(const rtl::OString&, int*, sal_uInt32*)’:
> /<<PKGBUILDDIR>>/sal/osl/unx/file.cxx:71:26: error: narrowing conversion of ‘4283649346’ from ‘unsigned int’ to ‘int’ [-Wnarrowing]
>     71 | #define CIFS_SUPER_MAGIC 0xFF534D42
>        |                          ^~~~~~~~~~
> /<<PKGBUILDDIR>>/sal/osl/unx/file.cxx:795:14: note: in expansion of macro ‘CIFS_SUPER_MAGIC’
>    795 |         case CIFS_SUPER_MAGIC:
>        |              ^~~~~~~~~~~~~~~~

etc.  My Fedora 39 "Linux man-pages 6.05" statfs(2) man page explains about the
struct statfs f_type field of __fsword_t type:  "The __fsword_t type used for
various fields in the statfs structure definition is a glibc internal type, not
intended for public use.  This leaves the programmer in a bit of a conundrum
when trying to copy or compare these fields to local variables in a program.
Using unsigned int for such variables suffices on most systems."  But the
underlying __FSWORD_T_TYPE looks like it is actually defined as a signed type in
/usr/include/bits/typesizes.h.

Change-Id: Ida3ae84031c4e48b0d6e69d76b66b4e4facfa1ae

Gbp-Pq: Name fix-32bit-build.diff
sal/osl/unx/file.cxx