| 1 | See https://github.com/libevent/libevent/pull/442 |
| 2 | |
| 3 | diff -u -r ../libevent-release-2.1.8-stable/include/event2/dns_compat.h ./include/event2/dns_compat.h |
| 4 | --- ../libevent-release-2.1.8-stable/include/event2/dns_compat.h 2017-01-26 00:37:15.000000000 +0100 |
| 5 | +++ ./include/event2/dns_compat.h 2017-01-28 01:02:54.391639424 +0100 |
| 6 | @@ -66,6 +66,7 @@ |
| 7 | @return 0 if successful, or -1 if an error occurred |
| 8 | @see evdns_shutdown() |
| 9 | */ |
| 10 | +EVENT2_EXPORT_SYMBOL |
| 11 | int evdns_init(void); |
| 12 | |
| 13 | struct evdns_base; |
| 14 | @@ -76,6 +77,7 @@ |
| 15 | @deprecated This function is deprecated because use of the global |
| 16 | evdns_base is error-prone. |
| 17 | */ |
| 18 | +EVENT2_EXPORT_SYMBOL |
| 19 | struct evdns_base *evdns_get_global_base(void); |
| 20 | |
| 21 | /** |
| 22 | @@ -93,6 +95,7 @@ |
| 23 | active requests will return DNS_ERR_SHUTDOWN. |
| 24 | @see evdns_init() |
| 25 | */ |
| 26 | +EVENT2_EXPORT_SYMBOL |
| 27 | void evdns_shutdown(int fail_requests); |
| 28 | |
| 29 | /** |
| 30 | @@ -109,6 +112,7 @@ |
| 31 | @return 0 if successful, or -1 if an error occurred |
| 32 | @see evdns_nameserver_ip_add() |
| 33 | */ |
| 34 | +EVENT2_EXPORT_SYMBOL |
| 35 | int evdns_nameserver_add(unsigned long int address); |
| 36 | |
| 37 | /** |
| 38 | @@ -126,6 +130,7 @@ |
| 39 | @return the number of configured nameservers |
| 40 | @see evdns_nameserver_add() |
| 41 | */ |
| 42 | +EVENT2_EXPORT_SYMBOL |
| 43 | int evdns_count_nameservers(void); |
| 44 | |
| 45 | /** |
| 46 | @@ -140,6 +145,7 @@ |
| 47 | @return 0 if successful, or -1 if an error occurred |
| 48 | @see evdns_resume() |
| 49 | */ |
| 50 | +EVENT2_EXPORT_SYMBOL |
| 51 | int evdns_clear_nameservers_and_suspend(void); |
| 52 | |
| 53 | /** |
| 54 | @@ -155,6 +161,7 @@ |
| 55 | @return 0 if successful, or -1 if an error occurred |
| 56 | @see evdns_clear_nameservers_and_suspend() |
| 57 | */ |
| 58 | +EVENT2_EXPORT_SYMBOL |
| 59 | int evdns_resume(void); |
| 60 | |
| 61 | /** |
| 62 | @@ -170,6 +177,7 @@ |
| 63 | @return 0 if successful, or -1 if an error occurred |
| 64 | @see evdns_nameserver_add() |
| 65 | */ |
| 66 | +EVENT2_EXPORT_SYMBOL |
| 67 | int evdns_nameserver_ip_add(const char *ip_as_string); |
| 68 | |
| 69 | /** |
| 70 | @@ -186,6 +194,7 @@ |
| 71 | @return 0 if successful, or -1 if an error occurred |
| 72 | @see evdns_resolve_ipv6(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6() |
| 73 | */ |
| 74 | +EVENT2_EXPORT_SYMBOL |
| 75 | int evdns_resolve_ipv4(const char *name, int flags, evdns_callback_type callback, void *ptr); |
| 76 | |
| 77 | /** |
| 78 | @@ -198,6 +207,7 @@ |
| 79 | @return 0 if successful, or -1 if an error occurred |
| 80 | @see evdns_resolve_ipv4(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6() |
| 81 | */ |
| 82 | +EVENT2_EXPORT_SYMBOL |
| 83 | int evdns_resolve_ipv6(const char *name, int flags, evdns_callback_type callback, void *ptr); |
| 84 | |
| 85 | struct in_addr; |
| 86 | @@ -217,6 +227,7 @@ |
| 87 | @return 0 if successful, or -1 if an error occurred |
| 88 | @see evdns_resolve_reverse_ipv6() |
| 89 | */ |
| 90 | +EVENT2_EXPORT_SYMBOL |
| 91 | int evdns_resolve_reverse(const struct in_addr *in, int flags, evdns_callback_type callback, void *ptr); |
| 92 | |
| 93 | /** |
| 94 | @@ -233,6 +244,7 @@ |
| 95 | @return 0 if successful, or -1 if an error occurred |
| 96 | @see evdns_resolve_reverse_ipv6() |
| 97 | */ |
| 98 | +EVENT2_EXPORT_SYMBOL |
| 99 | int evdns_resolve_reverse_ipv6(const struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr); |
| 100 | |
| 101 | /** |
| 102 | @@ -251,6 +263,7 @@ |
| 103 | @param flags Ignored. |
| 104 | @return 0 if successful, or -1 if an error occurred |
| 105 | */ |
| 106 | +EVENT2_EXPORT_SYMBOL |
| 107 | int evdns_set_option(const char *option, const char *val, int flags); |
| 108 | |
| 109 | /** |
| 110 | @@ -278,6 +291,7 @@ |
| 111 | occurred (see above) |
| 112 | @see resolv.conf(3), evdns_config_windows_nameservers() |
| 113 | */ |
| 114 | +EVENT2_EXPORT_SYMBOL |
| 115 | int evdns_resolv_conf_parse(int flags, const char *const filename); |
| 116 | |
| 117 | /** |
| 118 | @@ -287,6 +301,7 @@ |
| 119 | caller to specify which evdns_base it applies to. The recommended |
| 120 | function is evdns_base_search_clear(). |
| 121 | */ |
| 122 | +EVENT2_EXPORT_SYMBOL |
| 123 | void evdns_search_clear(void); |
| 124 | |
| 125 | /** |
| 126 | @@ -298,6 +313,7 @@ |
| 127 | |
| 128 | @param domain the domain to be added to the search list |
| 129 | */ |
| 130 | +EVENT2_EXPORT_SYMBOL |
| 131 | void evdns_search_add(const char *domain); |
| 132 | |
| 133 | /** |
| 134 | @@ -312,6 +328,7 @@ |
| 135 | |
| 136 | @param ndots the new ndots parameter |
| 137 | */ |
| 138 | +EVENT2_EXPORT_SYMBOL |
| 139 | void evdns_search_ndots_set(const int ndots); |
| 140 | |
| 141 | /** |
| 142 | @@ -322,9 +339,11 @@ |
| 143 | function is evdns_add_server_port_with_base(). |
| 144 | |
| 145 | */ |
| 146 | +EVENT2_EXPORT_SYMBOL |
| 147 | struct evdns_server_port *evdns_add_server_port(evutil_socket_t socket, int flags, evdns_request_callback_fn_type callback, void *user_data); |
| 148 | |
| 149 | #ifdef _WIN32 |
| 150 | +EVENT2_EXPORT_SYMBOL |
| 151 | int evdns_config_windows_nameservers(void); |
| 152 | #define EVDNS_CONFIG_WINDOWS_NAMESERVERS_IMPLEMENTED |
| 153 | #endif |