]> git.lizzy.rs Git - plan9front.git/blob - sys/src/ape/lib/bsd/socketpair.c
ape: Add mkstemp to /sys/src/ape/lib/ap/gen/mkfile
[plan9front.git] / sys / src / ape / lib / bsd / socketpair.c
1 /* posix */
2 #include <sys/types.h>
3 #include <unistd.h>
4 #include <stdlib.h>
5 #include <errno.h>
6
7 /* bsd extensions */
8 #include <sys/uio.h>
9 #include <sys/socket.h>
10
11 int
12 socketpair(int domain, int type, int protocol, int *sv)
13 {
14         switch(domain){
15         case PF_UNIX:
16                 return pipe(sv);
17         default:
18                 errno = EOPNOTSUPP;
19                 return -1;
20         }
21 }