Javyre / swayfire

Sway/I3 inspired tiling window manager for Wayfire
GNU General Public License v3.0
171 stars 8 forks source link

Unbreak build on non-glibc systems #39

Closed jbeich closed 3 years ago

jbeich commented 3 years ago

Found on FreeBSD but Alpine Linux (musl) maybe affected as well.

$ meson setup /tmp/swayfire_build && meson compile -C /tmp/swayfire_build
src/pch/prefix.hpp:10:10: fatal error: 'bits/stdint-intn.h' file not found
#include <bits/stdint-intn.h>
         ^~~~~~~~~~~~~~~~~~~~
$ meson setup -Db_pch=false /tmp/swayfire_build && meson compile -C /tmp/swayfire_build
src/core/core.hpp:4:10: fatal error: 'bits/stdint-intn.h' file not found
#include <bits/stdint-intn.h>
         ^~~~~~~~~~~~~~~~~~~~
Javyre commented 3 years ago

Hey, thanks! I wasn't aware this was glibc-specific.

This is some old leftover usage of the wrong headers. What we really should be doing is not only including <cstdint> but also using the std:: namespaced types for all integer types from this header since that's the proper portable way of using it. Should be an easy search and replace.

Would you like to do this in this commit as well?