From 88ea3be30866a0abf0d1fa2ec6c12f0b8dfecc57 Mon Sep 17 00:00:00 2001 From: Mikael Urankar Date: Wed, 1 Dec 2021 15:52:28 +0900 Subject: devel/electron13: fix ENOTTY error on uv_pipe_open This patch was introduced for electron11 and slipped out when creating ports for electron 12 and 13. --- devel/electron13/Makefile | 2 +- ...third__party_electron__node_deps_uv_src_unix_pipe.c | 18 ++++++++++++++++++ editors/vscode/Makefile | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 devel/electron13/files/patch-third__party_electron__node_deps_uv_src_unix_pipe.c diff --git a/devel/electron13/Makefile b/devel/electron13/Makefile index e9f6a03054ce..60c3bd0000ca 100644 --- a/devel/electron13/Makefile +++ b/devel/electron13/Makefile @@ -1,7 +1,7 @@ PORTNAME= electron DISTVERSIONPREFIX= v DISTVERSION= ${ELECTRON_VER:S/-beta./.b/} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/:chromium \ https://commondatastorage.googleapis.com/chromium-fonts/:chromium_testfonts diff --git a/devel/electron13/files/patch-third__party_electron__node_deps_uv_src_unix_pipe.c b/devel/electron13/files/patch-third__party_electron__node_deps_uv_src_unix_pipe.c new file mode 100644 index 000000000000..d01c2065440c --- /dev/null +++ b/devel/electron13/files/patch-third__party_electron__node_deps_uv_src_unix_pipe.c @@ -0,0 +1,18 @@ +--- third_party/electron_node/deps/uv/src/unix/pipe.c.orig 2020-07-22 14:57:01 UTC ++++ third_party/electron_node/deps/uv/src/unix/pipe.c +@@ -150,9 +150,13 @@ int uv_pipe_open(uv_pipe_t* handle, uv_file fd) { + if (mode == -1) + return UV__ERR(errno); /* according to docs, must be EBADF */ + ++ /* If ioctl(FIONBIO) reports ENOTTY, try fcntl(F_GETFL) + fcntl(F_SETFL). ++ * Workaround for e.g. kqueue fds not supporting ioctls. ++ */ + err = uv__nonblock(fd, 1); +- if (err) +- return err; ++ if (err == UV_ENOTTY) ++ if (uv__nonblock == uv__nonblock_ioctl) ++ err = uv__nonblock_fcntl(fd, 1); + + #if defined(__APPLE__) + err = uv__stream_try_select((uv_stream_t*) handle, &fd); diff --git a/editors/vscode/Makefile b/editors/vscode/Makefile index 1a73f478d679..ccdd0a127eda 100644 --- a/editors/vscode/Makefile +++ b/editors/vscode/Makefile @@ -1,6 +1,6 @@ PORTNAME= vscode DISTVERSION= 1.62.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= editors MASTER_SITES= https://registry.npmjs.org/esbuild-freebsd-64/-/:esbuild_binary \ https://nodejs.org/dist/v${NODE_VER}/:node_headers \ -- cgit v1.2.3