mamedev / mame

MAME
https://www.mamedev.org/
Other
8.03k stars 2k forks source link

check if __GLIBC__ is defined before testing its value #8107

Open libTorrentUser opened 3 years ago

libTorrentUser commented 3 years ago

3rdparty/asio is testing the value of __GLIBC__ without checking if it is defined first. On some systems, specially those using MUSL (like Alpine Linux), this causes gcc to emit a warning that will break the build.

The problem happens in two files

3rdparty/asio/include/asio/detail/config.hpp https://github.com/mamedev/mame/blob/d724ac7c8a3e9d15741ed37991ba37359ed24175/3rdparty/asio/include/asio/detail/config.hpp#L891

3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp https://github.com/mamedev/mame/blob/d724ac7c8a3e9d15741ed37991ba37359ed24175/3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp#L26 https://github.com/mamedev/mame/blob/d724ac7c8a3e9d15741ed37991ba37359ed24175/3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp#L48

cuavas commented 3 years ago

Have you reported the issue upstream? https://github.com/chriskohlhoff/asio