diff --git a/package/lean/pdnsd-alt/patches/01-musl-compat.patch b/package/lean/pdnsd-alt/patches/01-musl-compat.patch new file mode 100644 index 000000000..c83332bc1 --- /dev/null +++ b/package/lean/pdnsd-alt/patches/01-musl-compat.patch @@ -0,0 +1,37 @@ +--- a/src/main.c ++++ b/src/main.c +@@ -219,6 +219,16 @@ static int check_ipv6() + */ + int main(int argc,char *argv[]) + { ++#if DEBUG>0 ++ { ++ int err; ++ /* Generate a key for storing our thread id's */ ++ if ((err=pthread_key_create(&thrid_key, NULL)) != 0) { ++ log_error("pthread_key_create failed: %s",strerror(err)); ++ _exit(1); ++ } ++ } ++#endif + int i,sig,pfd=-1; /* Initialized to inhibit compiler warning */ + + main_thrid=pthread_self(); +@@ -626,17 +636,6 @@ int main(int argc,char *argv[]) + pthread_sigmask(SIG_BLOCK,&sigs_msk,NULL); + #endif + +-#if DEBUG>0 +- { +- int err; +- /* Generate a key for storing our thread id's */ +- if ((err=pthread_key_create(&thrid_key, NULL)) != 0) { +- log_error("pthread_key_create failed: %s",strerror(err)); +- _exit(1); +- } +- } +-#endif +- + { + #if DEBUG>0 + int thrdsucc=1;