Browse Source

core: resolve - SR_DNS_MAX_QNO and SR_DNS_MAX_ANO can be defined via compiler options

- compiler -D or makefile variable CC_EXTRA_OPTS
- #4359
Daniel-Constantin Mierla 1 tháng trước cách đây
mục cha
commit
1525b61335
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      src/core/resolve.c

+ 5 - 1
src/core/resolve.c

@@ -39,7 +39,7 @@
  * On alpine linux musl library it is also not defined. There is no
  * musl feature test macro, so we look for glibc instead.
  */
-#if(defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ < 25) \
+#if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ < 25) \
 		|| !defined __GLIBC__
 #ifndef T_OPT
 #define T_OPT ns_t_opt
@@ -720,8 +720,12 @@ int match_search_list(const struct __res_state *res, char *name)
 }
 #endif
 
+#ifndef SR_DNS_MAX_QNO
 #define SR_DNS_MAX_QNO 10
+#endif
+#ifndef SR_DNS_MAX_ANO
 #define SR_DNS_MAX_ANO 100
+#endif
 
 /** gets the DNS records for name:type
  * returns a dyn. alloc'ed struct rdata linked list with the parsed responses