comiling acl workaround

This commit is contained in:
shuxin   zheng 2020-04-30 18:26:25 +08:00
parent 328d0e9c3e
commit 99c94a9366
7 changed files with 8 additions and 5 deletions

View File

@ -40,6 +40,7 @@
# include <assert.h>
# include <sys/types.h>
# include <net/if.h>
# ifndef _GNU_SOURCE
# define _GNU_SOURCE
# include <netdb.h>

View File

@ -4,10 +4,6 @@
#pragma comment(lib, "Iphlpapi.lib")
#endif
#ifdef ACL_UNIX
#include <net/if.h>
#endif
#ifndef ACL_PREPARE_COMPILE
#include "stdlib/acl_define.h"
@ -20,6 +16,7 @@
#endif
#ifdef ACL_UNIX
#include <net/if.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#include <netinet/in.h>

View File

@ -15,6 +15,7 @@
#include "stdlib/acl_msg.h"
#include "stdlib/acl_argv.h"
#include "stdlib/acl_mystring.h"
#include "stdlib/acl_stringops.h"
#include "net/acl_valid_hostname.h"
#endif

View File

@ -27,6 +27,7 @@
#include "net/acl_connect.h"
#include "net/acl_listen.h"
#include "net/acl_host_port.h"
#include "net/acl_valid_hostname.h"
#include "net/acl_vstream_net.h"
#endif

View File

@ -22,6 +22,7 @@
#include "stdlib/acl_msg.h"
#include "stdlib/acl_iostuff.h"
#include "stdlib/acl_sys_patch.h"
#include "net/acl_connect.h"
/* acl_unix_connect - connect to UNIX-domain listener */

View File

@ -19,6 +19,7 @@
#include "net/acl_sane_socket.h"
#include "net/acl_sane_inet.h"
#include "net/acl_mask_addr.h"
#include "net/acl_vstream_net.h"
#include "net/acl_dns.h"
#endif
@ -358,7 +359,7 @@ static int dns_lookup_close(ACL_ASTREAM *server acl_unused, void *ctx acl_unused
static int dns_stream_open(ACL_DNS *dns)
{
/* ndk9 居然要求 acl_vstream_bind 前加返回类型?*/
ACL_VSTREAM *stream = (ACL_VSTREAM*) acl_vstream_bind("0.0.0.0:0", 0, 0);
ACL_VSTREAM *stream = acl_vstream_bind("0.0.0.0:0", 0, 0);
if (stream == NULL) {
acl_msg_error("%s(%d), %s: acl_vstream_bind error=%s",

View File

@ -20,6 +20,7 @@
#include "stdlib/acl_mymalloc.h"
#include "stdlib/acl_iostuff.h"
#include "net/acl_host_port.h"
#include "net/acl_valid_hostname.h"
#include "net/acl_listen.h"
#endif