about summary refs log tree commit diff
path: root/src/network/connect.c
blob: 6074122edae13526c183dc75f0fc0136aa22b094 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <sys/socket.h>
#include "syscall.h"
#include "socketcall.h"
#include "libc.h"

int connect(int fd, const struct sockaddr *addr, socklen_t len)
{
	unsigned long args[] = { fd, (unsigned long)addr, len };
	int ret;
	CANCELPT_BEGIN;
	ret = syscall2(__NR_socketcall, SYS_CONNECT, (long)args);
	CANCELPT_END;
	return ret;
}