From 930a65fe475328cfdec4e087a76a3465c3867805 Mon Sep 17 00:00:00 2001 From: Andrew Gallatin Date: Thu, 16 Nov 2000 01:05:53 +0000 Subject: [PATCH] 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 --- sys/alpha/linux/syscalls.master | 3 ++- 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 324e85d57ca..aacbb2e5f85 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 2fdd3df7388..cfc7179cc08 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;