34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
From: https://git.alpinelinux.org/aports/tree/community/tpm2-tss/musl-32bit-stat-workaround.patch
|
|
|
|
diff --git a/Makefile-test.am b/Makefile-test.am
|
|
index 020b6680..135195ee 100644
|
|
--- a/Makefile-test.am
|
|
+++ b/Makefile-test.am
|
|
@@ -648,7 +648,8 @@ test_unit_fapi_io_LDFLAGS = $(TESTS_LDFLAGS) $(JSONC_LIBS) $(CURL_LIBS) \
|
|
-Wl,--wrap=write \
|
|
-Wl,--wrap=fileno \
|
|
-Wl,--wrap=fclose \
|
|
- -Wl,--wrap=stat
|
|
+ -Wl,--wrap=stat \
|
|
+ -Wl,--wrap=__stat_time64
|
|
test_unit_fapi_io_SOURCES = test/unit/fapi-io.c \
|
|
src/tss2-fapi/ifapi_json_deserialize.c \
|
|
src/tss2-fapi/ifapi_json_serialize.c \
|
|
diff --git a/test/unit/fapi-io.c b/test/unit/fapi-io.c
|
|
index 41600ca9..08936d7e 100644
|
|
--- a/test/unit/fapi-io.c
|
|
+++ b/test/unit/fapi-io.c
|
|
@@ -57,6 +57,12 @@ int
|
|
return 0;
|
|
}
|
|
|
|
+int
|
|
+ __wrap___stat_time64(const char *pathname, struct stat *statbuf, ...)
|
|
+{
|
|
+ return __wrap_stat(pathname, statbuf);
|
|
+}
|
|
+
|
|
FILE *
|
|
__real_fopen(const char *pathname, const char* mode, ...);
|
|
FILE *
|