Initial push
[termux-packages] / packages / c-ares / header-patch-from-nodejs.patch
1 diff -u -r /home/fornwall/termux/c-ares/src/ares.h ./ares.h
2 --- /home/fornwall/termux/c-ares/src/ares.h 2013-04-08 16:16:48.000000000 -0400
3 +++ ./ares.h 2014-09-24 17:46:41.000000000 -0400
4 @@ -19,8 +19,6 @@
5 #define ARES__H
6
7 #include "ares_version.h" /* c-ares version defines */
8 -#include "ares_build.h" /* c-ares build definitions */
9 -#include "ares_rules.h" /* c-ares rules enforcement */
10
11 /*
12 * Define WIN32 when build target is Win32 API
13 @@ -31,6 +29,56 @@
14 # define WIN32
15 #endif
16
17 +/*************************** libuv patch ***************/
18 +
19 +/*
20 + * We want to avoid autoconf altogether since there are a finite number of
21 + * operating systems and simply build c-ares. Therefore we do not want the
22 + * configurations provided by ares_build.h since we are always statically
23 + * linking c-ares into libuv. Having a system dependent ares_build.h forces
24 + * all users of ares.h to include the correct ares_build.h. We do not care
25 + * about the linking checks provided by ares_rules.h. This would complicate
26 + * the libuv build process.
27 + */
28 +
29 +
30 +#if defined(WIN32)
31 +/* Configure process defines this to 1 when it finds out that system */
32 +/* header file ws2tcpip.h must be included by the external interface. */
33 +/* #undef CARES_PULL_WS2TCPIP_H */
34 +# include <winsock2.h>
35 +# include <ws2tcpip.h>
36 +# include <windows.h>
37 +
38 +#else /* Not Windows */
39 +
40 +# include <sys/time.h>
41 +# include <sys/types.h>
42 +# include <sys/socket.h>
43 +#endif
44 +
45 +#if 0
46 +/* The size of `long', as computed by sizeof. */
47 +#define CARES_SIZEOF_LONG 4
48 +#endif
49 +
50 +/* Integral data type used for ares_socklen_t. */
51 +#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
52 +
53 +#if 0
54 +/* The size of `ares_socklen_t', as computed by sizeof. */
55 +#define CARES_SIZEOF_ARES_SOCKLEN_T 4
56 +#endif
57 +
58 +/* Data type definition of ares_socklen_t. */
59 +typedef int ares_socklen_t;
60 +
61 +#if 0 /* libuv disabled */
62 +#include "ares_rules.h" /* c-ares rules enforcement */
63 +#endif
64 +
65 +/*********************** end libuv patch ***************/
66 +
67 #include <sys/types.h>
68
69 /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
70 @@ -472,6 +520,8 @@
71 struct ares_txt_reply *next;
72 unsigned char *txt;
73 size_t length; /* length excludes null termination */
74 + unsigned char record_start; /* 1 - if start of new record
75 + * 0 - if a chunk in the same record */
76 };
77
78 struct ares_naptr_reply {
79 diff -u -r /home/fornwall/termux/c-ares/src/ares_version.h ./ares_version.h
80 --- /home/fornwall/termux/c-ares/src/ares_version.h 2013-05-12 09:40:32.000000000 -0400
81 +++ ./ares_version.h 2014-09-24 17:46:41.000000000 -0400
82 @@ -11,7 +11,7 @@
83 #define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
84 (ARES_VERSION_MINOR<<8)|\
85 (ARES_VERSION_PATCH))
86 -#define ARES_VERSION_STR "1.10.0"
87 +#define ARES_VERSION_STR "1.10.0-DEV"
88
89 #if (ARES_VERSION >= 0x010700)
90 # define CARES_HAVE_ARES_LIBRARY_INIT 1