Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/zbxmockfile.c')
-rw-r--r--tests/zbxmockfile.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/zbxmockfile.c b/tests/zbxmockfile.c
index de129859439..2b15d2cfe2a 100644
--- a/tests/zbxmockfile.c
+++ b/tests/zbxmockfile.c
@@ -45,16 +45,20 @@ struct zbx_mock_IO_FILE
FILE *__wrap_fopen(const char *path, const char *mode);
int __wrap_fclose(FILE *fp);
char *__wrap_fgets(char *s, int size, FILE *stream);
-int __wrap_connect(int socket, __CONST_SOCKADDR_ARG addr, socklen_t address_len);
+int __wrap_connect(int socket, void *addr, socklen_t address_len);
ssize_t __wrap_read(int fildes, void *buf, size_t nbyte);
int __wrap_open(const char *path, int oflag, ...);
int __wrap_stat(const char *path, struct stat *buf);
int __wrap___xstat(int ver, const char *pathname, struct stat *buf);
+#ifdef HAVE_FXSTAT
int __wrap___fxstat(int __ver, int __fildes, struct stat *__stat_buf);
+#endif
int __real_open(const char *path, int oflag, ...);
int __real_stat(const char *path, struct stat *buf);
+#ifdef HAVE_FXSTAT
int __real___fxstat(int __ver, int __fildes, struct stat *__stat_buf);
+#endif
static int is_profiler_path(const char *path)
{
@@ -168,7 +172,7 @@ char *__wrap_fgets(char *s, int size, FILE *stream)
return s;
}
-int __wrap_connect(int socket, __CONST_SOCKADDR_ARG addr, socklen_t address_len)
+int __wrap_connect(int socket, void *addr, socklen_t address_len)
{
zbx_mock_error_t error;
@@ -283,6 +287,7 @@ int __wrap___xstat(int ver, const char *pathname, struct stat *buf)
return __wrap_stat(pathname, buf);
}
+#ifdef HAVE_FXSTAT
int __wrap___fxstat(int __ver, int __fildes, struct stat *__stat_buf)
{
if (__fildes != INT_MAX)
@@ -292,3 +297,4 @@ int __wrap___fxstat(int __ver, int __fildes, struct stat *__stat_buf)
return 0;
}
+#endif