summaryrefslogtreecommitdiffstats
path: root/netwerk/sctp/src/win32-rands.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /netwerk/sctp/src/win32-rands.patch
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'netwerk/sctp/src/win32-rands.patch')
-rw-r--r--netwerk/sctp/src/win32-rands.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/netwerk/sctp/src/win32-rands.patch b/netwerk/sctp/src/win32-rands.patch
new file mode 100644
index 0000000000..65bd2a08dc
--- /dev/null
+++ b/netwerk/sctp/src/win32-rands.patch
@@ -0,0 +1,36 @@
+diff --git a/netinet/sctp_asconf.c b/netinet/sctp_asconf.c
+--- a/netinet/sctp_asconf.c
++++ b/netinet/sctp_asconf.c
+@@ -32,6 +32,14 @@
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
++#if defined(_WIN32)
++// Needed for unified build so that rand_s is available to all unified
++// sources.
++#if !defined(_CRT_RAND_S) && !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
++#define _CRT_RAND_S
++#endif
++#endif
++
+ #include <netinet/sctp_os.h>
+ #include <netinet/sctp_var.h>
+ #include <netinet/sctp_sysctl.h>
+diff --git a/user_environment.h b/user_environment.h
+--- a/user_environment.h
++++ b/user_environment.h
+@@ -30,6 +30,15 @@
+
+ #ifndef _USER_ENVIRONMENT_H_
+ #define _USER_ENVIRONMENT_H_
++
++#if defined(_WIN32)
++// Needed for unified build so that rand_s is available to all unified
++// sources.
++#if !defined(_CRT_RAND_S) && !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
++#define _CRT_RAND_S
++#endif
++#endif
++
+ /* __Userspace__ */
+ #include <sys/types.h>