mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-06 01:20:22 +01:00
On older 32-bit architectures such as i386, this redefines time_t to be 64-bit, and correspondingly increases the size of all system data structures that contain a time_t, such as struct timeval and struct stat. This is necessary to allow timestamps beyond January 2038 to be represented; as well as things that obviously deal with timestamps, this affects functions like stat() (and therefore our wrapper _dbus_stat()), which will fail with EOVERFLOW if asked to inspect a file whose correct timestamp does not fit in time_t. In particular, if the modification or access timestamp on /etc/machine-id has somehow been set to a post-2038 time, libdbus will consider the inability to stat() that file to be an installation error, and when using the deprecated dbus_get_local_machine_id(), that can cause third-party i386 software such as the Steam client to crash. Using 64-bit timestamps avoids that failure mode. Using 64-bit timestamps in glibc is an opt-in and not the default, because if done carelessly it can change libraries' ABIs. However, libdbus is careful not to include system headers and system data types in its own headers, with the only exceptions being extremely basic ISO C headers like <stddef.h> and <stdarg.h>; so we can safely do this without it breaking our ABI. This is similar to the reasoning for why commit |
||
|---|---|---|
| .. | ||
| bus | ||
| modules | ||
| bus-test.bat.cmake | ||
| config.h.cmake | ||
| ConfigureChecks.cmake | ||
| dbus-env.bat.cmake | ||
| DBus1Config.cmake.in | ||
| DBus1Config.pkgconfig.in | ||
| DBus1ConfigVersion.cmake.in | ||
| i686-w64-mingw32.cmake | ||
| meson.build | ||
| x86_64-w64-mingw32.cmake | ||