--- third_party/electron_node/deps/uv/BUILD.gn.orig 2024-02-27 21:36: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) { @@ -157,7 +157,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) { @@ -172,7 +172,7 @@ static_library("uv") { "_DARWIN_UNLIMITED_SELECT=1", ] } - if (is_linux) { + if (is_linux && !is_bsd) { defines += [ "_GNU_SOURCE" ] sources += [ "src/unix/linux.c", @@ -189,6 +189,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", ] } }