mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:17:35 +00:00
LibArchive: Guard against major() and minor() macros from old glibc
glibc before 2.28 defines major() and minor() macros from sys/types.h. This triggers a Lagom warning for old distros that use versions older than that, such as Ubuntu 18.04. This fixes a break in the compiler-explorer Lagom build, which is based off 18.04 docker containers.
This commit is contained in:
parent
d40167f7bb
commit
c774790975
1 changed files with 10 additions and 0 deletions
|
@ -13,6 +13,16 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
// glibc before 2.28 defines these from sys/types.h, but we don't want
|
||||||
|
// TarFileHeader::major() and TarFileHeader::minor() to use those macros
|
||||||
|
#ifdef minor
|
||||||
|
# undef minor
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef major
|
||||||
|
# undef major
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Archive {
|
namespace Archive {
|
||||||
|
|
||||||
enum class TarFileType : char {
|
enum class TarFileType : char {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue