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 Musl builds #7934

Merged
merged 1 commit into from
Sep 28, 2024
Merged

Fix Musl builds #7934

merged 1 commit into from
Sep 28, 2024

Conversation

bivsk
Copy link
Contributor

@bivsk bivsk commented Sep 28, 2024

Describe your PR, what does it fix/add?

Musl does not include the glibc internal type __time_t, causing builds on Musl systems to fail. Use time_t instead.
Fixes #7858

../hyprland-source/src/protocols/PresentationTime.cpp:61:5: error: unknown type name '__time_t'; did you mean 'time_t'?
   61 |     __time_t tv_sec = 0;
      |     ^~~~~~~~
      |     time_t
/usr/include/bits/alltypes.h:85:16: note: 'time_t' declared here
   85 | typedef _Int64 time_t;
      |                ^
../hyprland-source/src/protocols/PresentationTime.cpp:62:16: error: unknown type name '__time_t'; did you mean 'time_t'?
   62 |     if (sizeof(__time_t) > 4)

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

I'm not sure why __time_t is being used here?

Musl does not include the internal type `__time_t`.
Use `time_t` instead.
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

me neither

@vaxerski vaxerski merged commit 6f313de into hyprwm:main Sep 28, 2024
12 checks passed
@bivsk bivsk deleted the musl branch September 28, 2024 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

musl support on Hyprland?
2 participants