2011-07-11 13:30:05 +02:00
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
#include <_ansi.h>
|
|
|
|
#include <_syslist.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#undef errno
|
|
|
|
extern int errno;
|
|
|
|
#include "warning.h"
|
|
|
|
#include "syscall.h"
|
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
_DEFUN (connect, (s, name, namelen),
|
2011-07-11 14:20:49 +02:00
|
|
|
int s _AND void *name _AND int namelen)
|
2011-07-11 13:30:05 +02:00
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ret = SYSCALL3(__NR_connect, s, name, namelen);
|
|
|
|
if (ret < 0) {
|
|
|
|
errno = -ret;
|
|
|
|
ret = -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
2011-07-11 14:20:49 +02:00
|
|
|
}
|