@@ -492,6 +492,7 @@ context_set_tls_authentication(getdns_context *context, PyObject *py_value)
492492}
493493
494494
495+ #if GETDNS_NUMERIC_VERSION > 0x00050000
495496int
496497context_set_tls_query_padding_blocksize (getdns_context * context , PyObject * py_value )
497498{
@@ -521,8 +522,9 @@ context_set_tls_query_padding_blocksize(getdns_context *context, PyObject *py_va
521522 }
522523 return 0 ;
523524}
525+ #endif
524526
525-
527+ #if GETDNS_NUMERIC_VERSION > 0x00050000
526528int
527529context_set_edns_client_subnet_private (getdns_context * context , PyObject * py_value )
528530{
@@ -556,7 +558,7 @@ context_set_edns_client_subnet_private(getdns_context *context, PyObject *py_val
556558 }
557559 return 0 ;
558560}
559-
561+ #endif
560562
561563int
562564context_set_edns_version (getdns_context * context , PyObject * py_value )
@@ -1055,6 +1057,7 @@ context_getattro(PyObject *self, PyObject *nameobj)
10551057 return PyInt_FromLong (limit_outstanding_queries );
10561058#endif
10571059 }
1060+ #if GETDNS_NUMERIC_VERSION > 0x00050000
10581061 if (!strncmp (attrname , "tls_query_padding_blocksize" , strlen ("tls_query_padding_blocksize" ))) {
10591062 uint16_t tls_query_padding_blocksize ;
10601063 if ((ret = getdns_context_get_tls_query_padding_blocksize (context , & tls_query_padding_blocksize )) !=
@@ -1068,6 +1071,8 @@ context_getattro(PyObject *self, PyObject *nameobj)
10681071 return PyInt_FromLong ((long )tls_query_padding_blocksize );
10691072#endif
10701073 }
1074+ #endif
1075+ #if GETDNS_NUMERIC_VERSION > 0x00050000
10711076 if (!strncmp (attrname , "edns_client_subnet_private" , strlen ("edns_client_subnet_private" ))) {
10721077 uint8_t edns_client_subnet_private ;
10731078 if ((ret = getdns_context_get_edns_client_subnet_private (context , & edns_client_subnet_private )) !=
@@ -1081,6 +1086,8 @@ context_getattro(PyObject *self, PyObject *nameobj)
10811086 return PyInt_FromLong ((long )edns_client_subnet_private );
10821087#endif
10831088 }
1089+ #endif
1090+ #if GETDNS_NUMERIC_VERSION > 0x00050000
10841091 if (!strncmp (attrname , "tls_authentication" , strlen ("tls_authentication" ))) {
10851092 getdns_tls_authentication_t value ;
10861093 if ((ret = getdns_context_get_tls_authentication (context , & value )) !=
@@ -1094,6 +1101,7 @@ context_getattro(PyObject *self, PyObject *nameobj)
10941101 return PyInt_FromLong ((long )value );
10951102#endif
10961103 }
1104+ #endif
10971105 if (!strncmp (attrname , "follow_redirects" , strlen ("follow_redirects" ))) {
10981106 uint32_t follow_redirects ;
10991107 if ((ret = getdns_dict_get_int (all_context , "follow_redirects" ,
@@ -1232,7 +1240,9 @@ struct setter_table setters[] = {
12321240 { "dnssec_allowed_skew" , context_set_dnssec_allowed_skew },
12331241 { "dns_root_servers" , context_set_dns_root_servers },
12341242 { "dns_transport_list" , context_set_dns_transport_list },
1243+ #if GETDNS_NUMERIC_VERSION > 0x00050000
12351244 { "edns_client_subnet_private" , context_set_edns_client_subnet_private },
1245+ #endif
12361246 { "edns_do_bit" , context_set_edns_do_bit },
12371247 { "edns_extended_rcode" , context_set_edns_extended_rcode },
12381248 { "edns_maximum_udp_payload_size" , context_set_edns_maximum_udp_payload_size },
@@ -1245,7 +1255,9 @@ struct setter_table setters[] = {
12451255 { "suffix" , context_set_suffix },
12461256 { "timeout" , context_set_timeout },
12471257 { "tls_authentication" , context_set_tls_authentication },
1258+ #if GETDNS_NUMERIC_VERSION > 0x00050000
12481259 { "tls_query_padding_blocksize" , context_set_tls_query_padding_blocksize },
1260+ #endif
12491261 { "upstream_recursive_servers" , context_set_upstream_recursive_servers },
12501262};
12511263
0 commit comments