chiark / gitweb /
debianutils: Update from 4.8.3 to 4.8.4
[termux-packages] / packages / axel / search.c.patch
1 --- axel-2.16.1/src/search.c    2017-12-05 10:46:05.000000000 +0530
2 +++ search.c    2018-03-14 19:30:01.000000000 +0530
3 @@ -211,7 +211,7 @@
4                                 if (gettime() < results[i].speed_start_time
5                                     + results->conf->search_timeout)
6                                         continue; // not timed out yet
7 -                               pthread_cancel(*results[i].speed_thread);
8 +                               pthread_kill(*results[i].speed_thread, 0);
9                                 break; // do the bookkeeping
10                         case SPEED_FAILED:
11                                 break; // do the bookkeeping
12 @@ -262,9 +262,11 @@
13         int oldstate;
14  
15         /* Allow this thread to be killed at any time. */
16 +#ifndef __ANDROID__
17         pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &oldstate);
18         pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldstate);
19  
20 +#endif
21         memset(conn, 0, sizeof(conn_t));
22         conn->conf = results->conf;
23         if (conn_set(conn, results->url)