aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Urankar <mikael@FreeBSD.org>2021-12-01 06:52:28 +0000
committerHiroki Tagato <tagattie@FreeBSD.org>2021-12-01 06:54:31 +0000
commit88ea3be30866a0abf0d1fa2ec6c12f0b8dfecc57 (patch)
treeb53059b0070f8b8c8f8eeafa886e5b73da975bb5
parentc5c6d0c1e30e5d270c83d64806c7b0db059e8a30 (diff)
downloadports-88ea3be30866a0abf0d1fa2ec6c12f0b8dfecc57.tar.gz
ports-88ea3be30866a0abf0d1fa2ec6c12f0b8dfecc57.zip
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.
-rw-r--r--devel/electron13/Makefile2
-rw-r--r--devel/electron13/files/patch-third__party_electron__node_deps_uv_src_unix_pipe.c18
-rw-r--r--editors/vscode/Makefile2
3 files changed, 20 insertions, 2 deletions
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 \