summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/meson.build3
-rw-r--r--tests/tests.c16
2 files changed, 1 insertions, 18 deletions
diff --git a/tests/meson.build b/tests/meson.build
index b0375a122..66adb92bd 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -69,9 +69,7 @@ mocks = [
'-Wl,--wrap=fsync',
'-Wl,--wrap=fread',
'-Wl,--wrap=fgets',
- '-Wl,--wrap=__fgets_chk',
'-Wl,--wrap=fprintf',
- '-Wl,--wrap=__vfprintf_chk',
'-Wl,--wrap=fclose',
'-Wl,--wrap=feof',
'-Wl,--wrap=ferror',
@@ -115,6 +113,7 @@ flashrom_tests = executable('flashrom_unit_tests',
cargs,
'-ffunction-sections',
'-fdata-sections',
+ '-U_FORTIFY_SOURCE',
],
export_dynamic : true,
link_args : mocks,
diff --git a/tests/tests.c b/tests/tests.c
index 53bad6569..77cb1effd 100644
--- a/tests/tests.c
+++ b/tests/tests.c
@@ -222,14 +222,6 @@ char *__wrap_fgets(char *buf, int len, FILE *fp)
return NULL;
}
-char *__wrap___fgets_chk(char *buf, int len, FILE *fp)
-{
- LOG_ME;
- if (get_io() && get_io()->fgets)
- return get_io()->fgets(get_io()->state, buf, len, fp);
- return NULL;
-}
-
size_t __wrap_fread(void *ptr, size_t size, size_t nmemb, FILE *fp)
{
LOG_ME;
@@ -282,14 +274,6 @@ int __wrap_fprintf(FILE *fp, const char *fmt, ...)
return 0;
}
-int __wrap___vfprintf_chk(FILE *fp, const char *fmt, va_list args)
-{
- LOG_ME;
- if (get_io() && get_io()->fprintf)
- return get_io()->fprintf(get_io()->state, fp, fmt, args);
- return 0;
-}
-
int __wrap_fclose(FILE *fp)
{
LOG_ME;