Skip to content

Commit

Permalink
Try to fix the Windows build.
Browse files Browse the repository at this point in the history
  • Loading branch information
tuexen committed Sep 30, 2020
1 parent cb9f4ce commit b8df6b5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions usrsctplib/user_environment.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@

/* __Userspace__ */

#if !defined(_WIN32)
#if defined(_WIN32)
#if !defined(_CRT_RAND_S) && !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
#define _CRT_RAND_S
#endif
#else
#include <stdint.h>
#include <netinet/sctp_os_userspace.h>
#endif
Expand Down Expand Up @@ -62,7 +66,7 @@ userland_mutex_t atomic_mtx;
* provide _some_ kind of randomness. This should only be used
* inside other RNG's, like arc4random(9).
*/
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
#include <string.h>

void
Expand Down Expand Up @@ -105,9 +109,6 @@ finish_random(void)
return;
}
#elif defined(_WIN32)
#if !defined(_CRT_RAND_S)
#define _CRT_RAND_S
#endif
#include <stdlib.h>

void
Expand Down

0 comments on commit b8df6b5

Please sign in to comment.