aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/library.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js
index 2e0f3afb..2e24a462 100644
--- a/src/library.js
+++ b/src/library.js
@@ -6568,6 +6568,7 @@ LibraryManager.library = {
ENOTSUP: 95,
ENOTTY: 25,
ENXIO: 6,
+ EOPNOTSUPP: 45,
EOVERFLOW: 75,
EOWNERDEAD: 130,
EPERM: 1,
@@ -6649,6 +6650,7 @@ LibraryManager.library = {
95: 'Operation not supported',
25: 'Inappropriate ioctl for device',
6: 'No such device or address',
+ 45: 'Op not supported on transport endpoint',
75: 'Value too large for defined data type',
130: 'Owner died',
1: 'Operation not permitted',
@@ -7393,6 +7395,19 @@ LibraryManager.library = {
}
},
+ socketpair__deps: ['__setErrNo', '$ERRNO_CODES', 'pipe'],
+ socketpair: function(domain, type, protocol, sv) {
+ // int socketpair(int domain, int type, int protocol, int sv[2]);
+ // http://sources.iwp9.org/files/plan9/sys/src/ape/lib/bsd/socketpair.c
+ switch (domain) {
+ case {{{ cDefine('PF_UNIX') }}}:
+ return _pipe(sv);
+ default:
+ ___setErrNo(ERRNO_CODES.EOPNOTSUPP);
+ return -1;
+ }
+ },
+
// pty.h
openpty: function() { throw 'openpty: TODO' },