aboutsummaryrefslogtreecommitdiffstats
path: root/devel/electron35/files/patch-third__party_electron__node_deps_uv_unofficial.gni
blob: c8ac6aa1d477f25ba3b54074655f9ab61e21bf1e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--- third_party/electron_node/deps/uv/unofficial.gni.orig	2025-04-06 11:53:47 UTC
+++ third_party/electron_node/deps/uv/unofficial.gni
@@ -27,7 +27,7 @@ template("uv_gn_build") {
         "_FILE_OFFSET_BITS=64",
       ]
     }
-    if (is_linux) {
+    if (is_linux && !is_bsd) {
       defines += [
         "_POSIX_C_SOURCE=200112",
         "_GNU_SOURCE",
@@ -105,12 +105,21 @@ template("uv_gn_build") {
       sources += gypi_values.uv_sources_posix +
                  [ "src/unix/proctitle.c" ]
     }
-    if (is_linux) {
+    if (is_linux && !is_bsd) {
       sources += gypi_values.uv_sources_linux
     }
     if (is_apple) {
       sources += gypi_values.uv_sources_apple +
                  gypi_values.uv_sources_bsd_common
+    }
+    if (is_freebsd) {
+      sources += gypi_values.uv_sources_bsd_common + [
+        "src/unix/freebsd.c",
+        "src/unix/random-getrandom.c",
+        "src/unix/posix-hrtime.c",
+        "src/unix/bsd-proctitle.c",
+      ]
+      sources -= [ "src/unix/proctitle.c" ]
     }
   }
 }