--- third_party/electron_node/deps/uv/BUILD.gn.orig 2021-01-25 11:27:01 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) { @@ -150,7 +150,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) { @@ -165,7 +165,7 @@ static_library("uv") { "_DARWIN_UNLIMITED_SELECT=1", ] } - if (is_linux) { + if (is_linux && !is_bsd) { defines += [ "_GNU_SOURCE" ] sources += [ "src/unix/linux-core.c", @@ -186,6 +186,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", ] } }