Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 64-bit time_t on 32 bit architectures #236

Merged
merged 4 commits into from
Mar 24, 2024
Merged

Fix 64-bit time_t on 32 bit architectures #236

merged 4 commits into from
Mar 24, 2024

Commits on Mar 24, 2024

  1. Make pointer-to-int-cast warnings non-fatal

    Latest gcc on Debian unstable i386 starts to fail with
    
    > tests/test-umockdev-vala.vala:714:19: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
    >     xfer[0].tx_buf = (uint64) tx_buf;
    
    It's right -- this *is* an evil and wrong cast, but unfortunately Linux
    defines the struct precisely as that -- `u64`, on all platforms. As we
    can't selectively `#pragma` these away, disable the fatal warning
    globally.
    martinpitt committed Mar 24, 2024
    Configuration menu
    Copy the full SHA
    8739472 View commit details
    Browse the repository at this point in the history
  2. preload: Fix building with _FILE_OFFSET_BITS

    Unsetting `_FILE_OFFSET_BITS` causes time_t to be treated as 32-bit
    instead of the 64-bit that we want with `-D_TIME_BITS=64`.
    
    Fixes #216
    
    Co-Authored-By: Steve Langasek <[email protected]>
    Co-Authored-By: Martin Pitt <[email protected]>
    3 people authored and martinpitt committed Mar 24, 2024
    Configuration menu
    Copy the full SHA
    b947c51 View commit details
    Browse the repository at this point in the history
  3. tests: Make input_event handling compatible with 64-bit time_t

    The structure of struct input_event varies depending on whether 64-bit
    `time_t` is in use.
    vorlonofportland authored and martinpitt committed Mar 24, 2024
    Configuration menu
    Copy the full SHA
    2396055 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5167544 View commit details
    Browse the repository at this point in the history