blob: 9858ac40ad943cf6b02577e69e4b2fde6a2e8bbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
Upstream: https://github.com/stewartsmith/libeatmydata/pull/18
Reason: Libeatmydata redefines open and open64 so it can make those a NO_OP
for tests. Musl also defines these in fnctl.h, so we have to undefine them
to not get conflicting definitions
diff --git a/libeatmydata/libeatmydata.c b/libeatmydata/libeatmydata.c
index 8fe1b6a..95d940b 100644
--- a/libeatmydata/libeatmydata.c
+++ b/libeatmydata/libeatmydata.c
@@ -131,6 +131,8 @@ void LIBEATMYDATA_API sync(void)
(*libc_sync)();
}
+#undef open
+
int LIBEATMYDATA_API open(const char* pathname, int flags, ...)
{
va_list ap;
@@ -157,6 +159,8 @@ int LIBEATMYDATA_API open(const char* pathname, int flags, ...)
return (*libc_open)(pathname,flags,mode);
}
+#undef open64
+
#ifndef __USE_FILE_OFFSET64
int LIBEATMYDATA_API open64(const char* pathname, int flags, ...)
{
|