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:
-rw-r--r--include/comms.h8
-rw-r--r--include/zbxtypes.h6
-rw-r--r--src/libs/zbxcommon/file.c2
-rw-r--r--src/zabbix_agent/logfiles/logfiles.c2
4 files changed, 9 insertions, 9 deletions
diff --git a/include/comms.h b/include/comms.h
index 52745b05772..3f962eb55cc 100644
--- a/include/comms.h
+++ b/include/comms.h
@@ -20,13 +20,7 @@
#ifndef ZABBIX_COMMS_H
#define ZABBIX_COMMS_H
-#ifdef _WINDOWS
-# if defined(__INT_MAX__) && __INT_MAX__ == 2147483647
-typedef int ssize_t;
-# else
-typedef long ssize_t;
-# endif
-#endif
+#include "zbxtypes.h"
#ifdef _WINDOWS
# define ZBX_TCP_WRITE(s, b, bl) ((ssize_t)send((s), (b), (int)(bl), 0))
diff --git a/include/zbxtypes.h b/include/zbxtypes.h
index e4d39f5d412..ac38deb6b74 100644
--- a/include/zbxtypes.h
+++ b/include/zbxtypes.h
@@ -80,6 +80,12 @@ typedef uint32_t zbx_uint32_t;
typedef __int64 zbx_offset_t;
# define zbx_lseek(fd, offset, whence) _lseeki64(fd, (zbx_offset_t)(offset), whence)
+# if defined(__INT_MAX__) && __INT_MAX__ == 2147483647
+typedef int ssize_t;
+# else
+typedef long ssize_t;
+# endif
+
#else /* _WINDOWS */
# define zbx_stat(path, buf) stat(path, buf)
# define zbx_fstat(fd, buf) fstat(fd, buf)
diff --git a/src/libs/zbxcommon/file.c b/src/libs/zbxcommon/file.c
index d397777a895..e52e632e871 100644
--- a/src/libs/zbxcommon/file.c
+++ b/src/libs/zbxcommon/file.c
@@ -18,7 +18,7 @@
**/
#include "common.h"
-#include "comms.h"
+#include "zbxtypes.h"
#if defined(_WINDOWS) || defined(__MINGW32__)
int __zbx_open(const char *pathname, int flags)
diff --git a/src/zabbix_agent/logfiles/logfiles.c b/src/zabbix_agent/logfiles/logfiles.c
index 5ef476d9424..7b6994a4abe 100644
--- a/src/zabbix_agent/logfiles/logfiles.c
+++ b/src/zabbix_agent/logfiles/logfiles.c
@@ -24,7 +24,7 @@
#if defined(_WINDOWS) || defined(__MINGW32__)
# include "symbols.h"
-# include "comms.h" /* ssize_t */
+# include "zbxtypes.h" /* ssize_t */
#endif /* _WINDOWS */
#define MAX_LEN_MD5 512 /* maximum size of the initial part of the file to calculate MD5 sum for */