mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
fix segfault in debug mode (#2794)
This commit is contained in:
parent
5537db1a88
commit
a6fb452315
37
package/lean/pdnsd-alt/patches/01-musl-compat.patch
Normal file
37
package/lean/pdnsd-alt/patches/01-musl-compat.patch
Normal file
@ -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;
|
Loading…
Reference in New Issue
Block a user