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
35
36
37
38
39
40
41
42
43
44
45
46
|
--- third_party/electron_node/deps/uv/BUILD.gn.orig 2022-05-13 07:19:54 UTC
+++ third_party/electron_node/deps/uv/BUILD.gn
@@ -3,7 +3,7 @@ config("libuv_config") {
defines = []
- if (is_linux) {
+ if (is_linux && !is_bsd) {
defines += [ "_POSIX_C_SOURCE=200112" ]
}
if (!is_win) {
@@ -155,7 +155,7 @@ static_library("uv") {
libs += [ "m" ]
ldflags += [ "-pthread" ]
}
- if (is_mac || is_linux) {
+ if (is_mac || (is_linux && !is_bsd)) {
sources += [ "src/unix/proctitle.c" ]
}
if (is_mac) {
@@ -170,7 +170,7 @@ static_library("uv") {
"_DARWIN_UNLIMITED_SELECT=1",
]
}
- if (is_linux) {
+ if (is_linux && !is_bsd) {
defines += [ "_GNU_SOURCE" ]
sources += [
"src/unix/epoll.c",
@@ -191,6 +191,16 @@ static_library("uv") {
sources += [
"src/unix/bsd-ifaddrs.c",
"src/unix/kqueue.c",
+ ]
+ }
+ if (is_bsd) {
+ sources += [
+ "src/unix/bsd-ifaddrs.c",
+ "src/unix/bsd-proctitle.c",
+ "src/unix/freebsd.c",
+ "src/unix/kqueue.c",
+ "src/unix/posix-hrtime.c",
+ "src/unix/random-getrandom.c",
]
}
}
|