From: Andrea Bolognani Date: Thu, 4 Feb 2021 10:05:48 +0000 (+0100) Subject: Revert "tests: Avoid gnulib replacements in mocks" X-Git-Tag: v7.1.0-rc1~237 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab4834a786d3bd0e082447ea6484becf7729d687;p=thirdparty%2Flibvirt.git Revert "tests: Avoid gnulib replacements in mocks" Now that we're no longer using gnulib, we can treat macOS the same as all other targets. This reverts commit 0ae6f5cea54d95c0d1dedf04a0a2accfe2529fb2 Signed-off-by: Andrea Bolognani Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov --- diff --git a/tests/virfilewrapper.c b/tests/virfilewrapper.c index ca2356b5c9..7034e22420 100644 --- a/tests/virfilewrapper.c +++ b/tests/virfilewrapper.c @@ -163,12 +163,7 @@ int access(const char *path, int mode) return real_access(newpath ? newpath : path, mode); } -# ifdef __APPLE__ -int _open(const char *path, int flags, ...) __asm("_open"); -int _open(const char *path, int flags, ...) -# else int open(const char *path, int flags, ...) -# endif { g_autofree char *newpath = NULL; va_list ap; diff --git a/tests/virmockstathelpers.c b/tests/virmockstathelpers.c index 830dfe1085..367c3be95b 100644 --- a/tests/virmockstathelpers.c +++ b/tests/virmockstathelpers.c @@ -215,12 +215,7 @@ static int virMockStatRedirect(const char *path, char **newpath); #endif #ifdef MOCK_STAT -# ifdef __APPLE__ -int _stat(const char *path, struct stat *sb) __asm("_stat$INODE64"); -int _stat(const char *path, struct stat *sb) -# else int stat(const char *path, struct stat *sb) -# endif { g_autofree char *newpath = NULL; @@ -290,13 +285,8 @@ __xstat64(int ver, const char *path, struct stat64 *sb) #endif #ifdef MOCK_LSTAT -# ifdef __APPLE__ -int _lstat(const char *path, struct stat *sb) __asm("_lstat$INODE64"); -int _lstat(const char *path, struct stat *sb) -# else int lstat(const char *path, struct stat *sb) -# endif { g_autofree char *newpath = NULL;