summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/lib/sendmsg.c
blob: 277265985ada0478e3294a1e3a317a79992c0b2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <linux/net.h>

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

int __libc_sendmsg(int a, const struct msghdr* msg, int flags) {
#ifdef __i386__
  return socketcall(SYS_SENDMSG, (long*)&a);
#else
  unsigned long args[] = { a, (long) msg, flags };
  return socketcall(SYS_SENDMSG, args);
#endif
}

int sendmsg(int a, const struct msghdr *msg, int flags)
 __attribute__ ((weak,alias("__libc_sendmsg"))) ;