github.com/Psiphon-Labs/tls-tris@v0.0.0-20230824155421-58bf6d336a9a/_dev/tstclnt/poll.patch (about)

     1  diff -r 15c6a01b9fe8 cmd/tstclnt/tstclnt.c
     2  --- a/cmd/tstclnt/tstclnt.c	Fri Jun 10 18:34:00 2016 +0100
     3  +++ b/cmd/tstclnt/tstclnt.c	Thu Jun 16 16:26:29 2016 +0100
     4  @@ -713,7 +713,6 @@
     5       return NSS_GetClientAuthData(arg, socket, caNames, pRetCert, pRetKey);
     6   }
     7   
     8  -#if defined(WIN32) || defined(OS2)
     9   void
    10   thread_main(void *arg)
    11   {
    12  @@ -746,7 +745,6 @@
    13       PR_Close(ps);
    14   }
    15   
    16  -#endif
    17   
    18   static void
    19   printHostNameAndAddr(const char *host, const PRNetAddr *addr)
    20  @@ -1545,7 +1543,8 @@
    21       npds = 2;
    22       std_out = PR_GetSpecialFD(PR_StandardOutput);
    23   
    24  -#if defined(WIN32) || defined(OS2)
    25  +    // Enabled PR_Poll compatibility mode for running in docker run. (sigh).
    26  +
    27       /* PR_Poll cannot be used with stdin on Windows or OS/2.  (sigh).
    28       ** But use of PR_Poll and non-blocking sockets is a major feature
    29       ** of this program.  So, we simulate a pollable stdin with a
    30  @@ -1573,7 +1572,6 @@
    31               goto done;
    32           }
    33       }
    34  -#endif
    35   
    36       if (serverCertAuth.testFreshStatusFromSideChannel) {
    37           SSL_ForceHandshake(s);