Anastasia Klimchuk has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/73649 )
Change subject: tests: Add wrap for __fstat50 to fix tests for NetBSD ......................................................................
tests: Add wrap for __fstat50 to fix tests for NetBSD
Tested by running unit tests on NetBSD 9.2 Ubuntu 22.04.1 (still pass)
Change-Id: Icb8e453328cb40ab9d628f01ecdc3886a233dad5 Signed-off-by: Anastasia Klimchuk aklm@chromium.org --- M tests/meson.build M tests/tests.c M tests/wraps.h 3 files changed, 22 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/49/73649/1
diff --git a/tests/meson.build b/tests/meson.build index 2de4ee8..df866d7 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -60,6 +60,7 @@ '-Wl,--wrap=__xstat64', '-Wl,--wrap=fstat', '-Wl,--wrap=fstat64', + '-Wl,--wrap=__fstat50', '-Wl,--wrap=__fxstat', '-Wl,--wrap=__fxstat64', '-Wl,--wrap=fileno', diff --git a/tests/tests.c b/tests/tests.c index 911cf47..d296a98 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -229,6 +229,12 @@ return 0; }
+int __wrap___fstat50(int fd, void *buf) +{ + LOG_ME; + return 0; +} + int __wrap___fxstat(int fd, void *buf) { LOG_ME; diff --git a/tests/wraps.h b/tests/wraps.h index 6cc9567..089d992 100644 --- a/tests/wraps.h +++ b/tests/wraps.h @@ -46,6 +46,7 @@ int __wrap___xstat64(const char *path, void *buf); int __wrap_fstat(int fd, void *buf); int __wrap_fstat64(int fd, void *buf); +int __wrap___fstat50(int fd, void *buf); int __wrap___fxstat(int fd, void *buf); int __wrap___fxstat64(int fd, void *buf); char *__wrap_fgets(char *buf, int len, FILE *fp);