diff --git a/src/EmuFs.cc b/src/EmuFs.cc index 99e0a684b90..d2ba392e5c7 100644 --- a/src/EmuFs.cc +++ b/src/EmuFs.cc @@ -10,6 +10,13 @@ #include #include +// muslc defines those, but we want a typedef instead +#if defined(loff_t) +typedef loff_t __musl_loff_t; +#undef loff_t +typedef __musl_loff_t loff_t; +#endif + #include "AddressSpace.h" #include "ReplaySession.h" #include "core.h" diff --git a/src/ScopedFd.h b/src/ScopedFd.h index 4a02fdd23c6..377488f9c1a 100644 --- a/src/ScopedFd.h +++ b/src/ScopedFd.h @@ -3,6 +3,9 @@ #ifndef RR_SCOPED_FD_H_ #define RR_SCOPED_FD_H_ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif #include #include #include diff --git a/src/record_syscall.cc b/src/record_syscall.cc index 9f757286baa..3bc6bdfeb42 100644 --- a/src/record_syscall.cc +++ b/src/record_syscall.cc @@ -102,6 +102,13 @@ #include "log.h" #include "util.h" +// muslc defines those, but we want a typedef instead +#if defined(loff_t) +typedef loff_t __musl_loff_t; +#undef loff_t +typedef __musl_loff_t loff_t; +#endif + using namespace std; #ifndef HAVE_TERMIOS2