Skip to content

Commit 1a09f94

Browse files
committed
provide loff_t as typedef
muslc defines those, but we want a typedef instead solution copied from libgo https://gcc.gnu.org/pipermail/gcc-patches/2022-April/593527.html
1 parent 80981f6 commit 1a09f94

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/EmuFs.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
#include <sstream>
1111
#include <string>
1212

13+
// muslc defines those, but we want a typedef instead
14+
#if defined(loff_t)
15+
typedef loff_t __musl_loff_t;
16+
#undef loff_t
17+
typedef __musl_loff_t loff_t;
18+
#endif
19+
1320
#include "AddressSpace.h"
1421
#include "ReplaySession.h"
1522
#include "core.h"

src/record_syscall.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@
102102
#include "log.h"
103103
#include "util.h"
104104

105+
// muslc defines those, but we want a typedef instead
106+
#if defined(loff_t)
107+
typedef loff_t __musl_loff_t;
108+
#undef loff_t
109+
typedef __musl_loff_t loff_t;
110+
#endif
111+
105112
using namespace std;
106113

107114
#ifndef HAVE_TERMIOS2

0 commit comments

Comments
 (0)