Include unistd.h for ssize_t

When compiling on buildroot I get:
`src/tls.c:235:28: error: ‘ssize_t’ undeclared (first use in this
function); did you mean ‘size_t’? `

To have this POSIX type available we will need to include
`sys/types.h` or `unistd.h`.
This commit is contained in:
Michael Vetter
2022-05-30 14:47:44 +02:00
parent 044398eeba
commit f0383d50cd
2 changed files with 8 additions and 0 deletions

View File

@@ -23,6 +23,10 @@
#include <string.h> /* memeset */
#include <time.h> /* clock, time */
#if !defined(_WIN32)
#include <unistd.h>
#endif
#if !defined(DONT_USE_GETRANDOM) && defined(__linux__) && \
defined(__GLIBC_PREREQ)
#if __GLIBC_PREREQ(2, 25)

View File

@@ -21,6 +21,10 @@
#include <stdarg.h>
#include <string.h>
#if !defined(_WIN32)
#include <unistd.h>
#endif
#include "strophe.h"
#include "common.h"