tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

win32-rands.patch (955B)


      1 diff --git a/netinet/sctp_asconf.c b/netinet/sctp_asconf.c
      2 --- a/netinet/sctp_asconf.c
      3 +++ b/netinet/sctp_asconf.c
      4 @@ -32,6 +32,14 @@
      5  * THE POSSIBILITY OF SUCH DAMAGE.
      6  */
      7 
      8 +#if defined(_WIN32)
      9 +// Needed for unified build so that rand_s is available to all unified
     10 +// sources.
     11 +#if !defined(_CRT_RAND_S) && !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
     12 +#define _CRT_RAND_S
     13 +#endif
     14 +#endif
     15 +
     16 #include <netinet/sctp_os.h>
     17 #include <netinet/sctp_var.h>
     18 #include <netinet/sctp_sysctl.h>
     19 diff --git a/user_environment.h b/user_environment.h
     20 --- a/user_environment.h
     21 +++ b/user_environment.h
     22 @@ -30,6 +30,15 @@
     23 
     24 #ifndef _USER_ENVIRONMENT_H_
     25 #define _USER_ENVIRONMENT_H_
     26 +
     27 +#if defined(_WIN32)
     28 +// Needed for unified build so that rand_s is available to all unified
     29 +// sources.
     30 +#if !defined(_CRT_RAND_S) && !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
     31 +#define _CRT_RAND_S
     32 +#endif
     33 +#endif
     34 +
     35 /* __Userspace__ */
     36 #include <sys/types.h>