1
0
mirror of https://github.com/termux/termux-packages synced 2024-06-15 14:56:40 +00:00
termux-packages/packages/tsocks/tsocks.c.patch
2017-09-22 00:29:36 +02:00

17 lines
404 B
Diff

diff --git a/tsocks.c b/tsocks.c
index 9cfdfff..5518633 100644
--- a/tsocks.c
+++ b/tsocks.c
@@ -682,6 +682,11 @@ int close(CLOSE_SIGNATURE) {
int rc;
struct connreq *conn;
+ /*Sometimes this function seems to get called before _init has run*/
+ if (realclose == NULL) {
+ _init();
+ }
+
if (realclose == NULL) {
show_msg(MSGERR, "Unresolved symbol: close\n");
return(-1);