diff options
author | gallatin <gallatin@FreeBSD.org> | 2000-11-16 01:05:53 +0000 |
---|---|---|
committer | gallatin <gallatin@FreeBSD.org> | 2000-11-16 01:05:53 +0000 |
commit | 0ee48b4aca419a4b02c82a50299bcd6e23a3a25b (patch) | |
tree | 129e56101022ed239a4e36a242362d0327169ec6 /sys | |
parent | f930ff839030a5450d4b2c0a33c3c44aff60d7e5 (diff) | |
download | FreeBSD-src-0ee48b4aca419a4b02c82a50299bcd6e23a3a25b.zip FreeBSD-src-0ee48b4aca419a4b02c82a50299bcd6e23a3a25b.tar.gz |
Use the linux_connect() on alpha rather than passing directly through
to our native connect(). This is required to deal with the differences
in the way linux handles connects on non-blocking sockets.
This gets the private beta of the Compaq Linux/alpha JDK working
on FreeBSD/alpha
Approved by: marcel
Diffstat (limited to 'sys')
-rw-r--r-- | sys/alpha/linux/syscalls.master | 3 | ||||
-rw-r--r-- | sys/compat/linux/linux_socket.c | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/sys/alpha/linux/syscalls.master b/sys/alpha/linux/syscalls.master index 324e85d..aacbb2e 100644 --- a/sys/alpha/linux/syscalls.master +++ b/sys/alpha/linux/syscalls.master @@ -150,7 +150,8 @@ 96 NOPROTO LINUX { int setpriority(int which, int who, int prio); } 97 STD LINUX { int osf1_socket(int domain, int type, \ int protocol); } -98 NOPROTO LINUX { int connect(int s, caddr_t name, int namelen); } +98 STD LINUX { int linux_connect(int s, caddr_t name, \ + int namelen); } 99 NOPROTO LINUX { int oaccept(int s, caddr_t name, int *anamelen); } \ accept accept_args int 100 UNIMPL LINUX diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 2fdd3df..cfc7179 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -343,8 +343,10 @@ struct linux_connect_args { struct sockaddr * name; int namelen; }; +int linux_connect(struct proc *, struct linux_connect_args *); +#endif /* !__alpha__*/ -static int +int linux_connect(struct proc *p, struct linux_connect_args *args) { struct linux_connect_args linux_args; @@ -355,8 +357,12 @@ linux_connect(struct proc *p, struct linux_connect_args *args) } */ bsd_args; int error; +#ifdef __alpha__ + bcopy(args, &linux_args, sizeof(linux_args)); +#else if ((error = copyin(args, &linux_args, sizeof(linux_args)))) return (error); +#endif /* __alpha__ */ bsd_args.s = linux_args.s; bsd_args.name = (caddr_t)linux_args.name; @@ -418,6 +424,8 @@ linux_connect(struct proc *p, struct linux_connect_args *args) return (error); } +#ifndef __alpha__ + struct linux_listen_args { int s; int backlog; |