metalsvm/newlib/net/bind.c
2011-08-02 12:24:05 +02:00

25 lines
378 B
C

#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 (bind, (s, name, namelen),
int s _AND void *name _AND int namelen)
{
int ret;
ret = SYSCALL3(__NR_bind, s, name, namelen);
if (ret < 0) {
errno = -ret;
ret = -1;
}
return ret;
}