diff options
Diffstat (limited to 'libpurple/protocols/gg/lib/common.c')
-rw-r--r-- | libpurple/protocols/gg/lib/common.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/libpurple/protocols/gg/lib/common.c b/libpurple/protocols/gg/lib/common.c index 4bb053f943..acac5fb35f 100644 --- a/libpurple/protocols/gg/lib/common.c +++ b/libpurple/protocols/gg/lib/common.c @@ -24,22 +24,14 @@ * * \brief Funkcje wykorzystywane przez różne moduły biblioteki */ -#ifndef _WIN32 -# include <sys/types.h> -# include <sys/ioctl.h> -# include <sys/socket.h> -# include <netinet/in.h> -# include <arpa/inet.h> -# ifdef sun -# include <sys/filio.h> -# endif +#include "compat.h" +#include <sys/types.h> +#ifdef sun +# include <sys/filio.h> #endif #include <errno.h> #include <fcntl.h> -#ifndef _WIN32 -# include <netdb.h> -#endif #include <stdarg.h> #include <stdio.h> #include <stdlib.h> @@ -92,7 +84,7 @@ char *gg_vsaprintf(const char *format, va_list ap) } buf = tmp; res = vsnprintf(buf, size, format, ap); - } while (res == size - 1 || res == -1); + } while (res >= size - 1 || res == -1); } #else { |