aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/library.js10
-rw-r--r--system/include/sys/socket.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js
index 2663512d..1ba4f2fa 100644
--- a/src/library.js
+++ b/src/library.js
@@ -6639,6 +6639,7 @@ LibraryManager.library = {
ENOTSUP: 95,
ENOTTY: 25,
ENXIO: 6,
+ EOPNOTSUPP: 45,
EOVERFLOW: 75,
EOWNERDEAD: 130,
EPERM: 1,
@@ -6720,6 +6721,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',
@@ -7464,6 +7466,14 @@ LibraryManager.library = {
}
},
+ socketpair__deps: ['__setErrNo', '$ERRNO_CODES'],
+ socketpair: function(domain, type, protocol, sv) {
+ // int socketpair(int domain, int type, int protocol, int sv[2]);
+ // http://pubs.opengroup.org/onlinepubs/009695399/functions/socketpair.html
+ ___setErrNo(ERRNO_CODES.EOPNOTSUPP);
+ return -1;
+ },
+
// pty.h
openpty: function() { throw 'openpty: TODO' },
diff --git a/system/include/sys/socket.h b/system/include/sys/socket.h
index 8ca6eccf..56a37375 100644
--- a/system/include/sys/socket.h
+++ b/system/include/sys/socket.h
@@ -68,6 +68,7 @@ ssize_t recv(int s, void *buf, size_t len, int flags);
ssize_t send(int s, const void *buf, size_t len, int flags);
int setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen);
ssize_t sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);
+int socketpair(int domain, int type, int protocol, int sv[2]);
struct msghdr
{