git: 570ab3e0e8f1 - main - devel/electron11: Fix ENOTTY error on uv_pipe_open.
Hiroki Tagato
tagattie at FreeBSD.org
Sat May 1 07:55:19 UTC 2021
The branch main has been updated by tagattie:
URL: https://cgit.FreeBSD.org/ports/commit/?id=570ab3e0e8f1cba3c1bb27d77467ecde2713490f
commit 570ab3e0e8f1cba3c1bb27d77467ecde2713490f
Author: Mikael Urankar <mikael at FreeBSD.org>
AuthorDate: 2021-05-01 07:52:58 +0000
Commit: Hiroki Tagato <tagattie at FreeBSD.org>
CommitDate: 2021-05-01 07:52:58 +0000
devel/electron11: Fix ENOTTY error on uv_pipe_open.
---
devel/electron11/Makefile | 1 +
...third__party_electron__node_deps_uv_src_unix_pipe.c | 18 ++++++++++++++++++
2 files changed, 19 insertions(+)
diff --git a/devel/electron11/Makefile b/devel/electron11/Makefile
index 4024486c7b06..a54a120817c5 100644
--- a/devel/electron11/Makefile
+++ b/devel/electron11/Makefile
@@ -1,6 +1,7 @@
PORTNAME= electron
DISTVERSIONPREFIX= v
DISTVERSION= ${ELECTRON_VER:S/-beta./.b/}
+PORTREVISION= 1
CATEGORIES= devel java
MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/:chromium_official \
https://commondatastorage.googleapis.com/chromium-nodejs/:chromium_node \
diff --git a/devel/electron11/files/patch-third__party_electron__node_deps_uv_src_unix_pipe.c b/devel/electron11/files/patch-third__party_electron__node_deps_uv_src_unix_pipe.c
new file mode 100644
index 000000000000..d01c2065440c
--- /dev/null
+++ b/devel/electron11/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);
More information about the dev-commits-ports-all
mailing list