mirror of
https://github.com/Tha14/toxic.git
synced 2024-12-23 03:43:25 +01:00
Update misc_tools.c (#408)
* Update misc_tools.c Fix build on FreeBSD with clang. Without this patch, compilation fails with these messages: CC misc_tools.o /usr/ports/net-im/toxic/work/toxic-0.7.1/src/misc_tools.c:479:24: error: variable has incomplete type 'struct sockaddr_in' struct sockaddr_in s_addr; ^ /usr/ports/net-im/toxic/work/toxic-0.7.1/src/misc_tools.c:479:12: note: forward declaration of 'struct sockaddr_in' struct sockaddr_in s_addr; ^ /usr/ports/net-im/toxic/work/toxic-0.7.1/src/misc_tools.c:480:22: error: use of undeclared identifier 'AF_INET' return inet_pton(AF_INET, address, &(s_addr.sin_addr)) != 0; ^ 2 errors generated. * Fix build on FreeBSD with clang Without this patch, compilation fails with these messages: CC misc_tools.o /usr/ports/net-im/toxic/work/toxic-0.7.1/src/misc_tools.c:479:24: error: variable has incomplete type 'struct sockaddr_in' struct sockaddr_in s_addr; ^ /usr/ports/net-im/toxic/work/toxic-0.7.1/src/misc_tools.c:479:12: note: forward declaration of 'struct sockaddr_in' struct sockaddr_in s_addr; ^ /usr/ports/net-im/toxic/work/toxic-0.7.1/src/misc_tools.c:480:22: error: use of undeclared identifier 'AF_INET' return inet_pton(AF_INET, address, &(s_addr.sin_addr)) != 0; ^ 2 errors generated.
This commit is contained in:
parent
f056f13329
commit
e17fa89d8f
@ -26,9 +26,13 @@
|
||||
#include <time.h>
|
||||
#include <limits.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#if defined(__FreeBSD__)
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "toxic.h"
|
||||
#include "windows.h"
|
||||
|
Loading…
Reference in New Issue
Block a user