summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/lib/socketpair.c
blob: e6f1fd8227f1e1a18ba82e0345edea80347a055c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <linuxnet.h>

extern int socketcall(int callno,long* args);

int __libc_socketpair(int a, int type, int protocol, int sv[2]);
int __libc_socketpair(int a, int type, int protocol, int sv[2]) {
  unsigned long args[] = { a, type, protocol, (long)sv };
  return socketcall(SYS_SOCKETPAIR, args);
}

int socketpair(int d, int type, int protocol, int sv[2])
  __attribute__((weak,alias("__libc_socketpair")));