cleanup socketcall syscall interface to ease porting to sane(r) archs
This commit is contained in:
@@ -127,6 +127,13 @@ struct winsize {
|
||||
#define N_SYNC_PPP 14
|
||||
#define N_HCI 15
|
||||
|
||||
#define FIOSETOWN 0x8901
|
||||
#define SIOCSPGRP 0x8902
|
||||
#define FIOGETOWN 0x8903
|
||||
#define SIOCGPGRP 0x8904
|
||||
#define SIOCATMARK 0x8905
|
||||
#define SIOCGSTAMP 0x8906
|
||||
|
||||
#define SIOCADDRT 0x890B
|
||||
#define SIOCDELRT 0x890C
|
||||
#define SIOCRTMSG 0x890D
|
||||
|
||||
@@ -501,6 +501,27 @@ static inline long syscall6(long n, long a1, long a2, long a3, long a4, long a5,
|
||||
#define __NR_pread __NR_pread64
|
||||
#define __NR_pwrite __NR_pwrite64
|
||||
|
||||
#define __SC_socket 1
|
||||
#define __SC_bind 2
|
||||
#define __SC_connect 3
|
||||
#define __SC_listen 4
|
||||
#define __SC_accept 5
|
||||
#define __SC_getsockname 6
|
||||
#define __SC_getpeername 7
|
||||
#define __SC_socketpair 8
|
||||
#define __SC_send 9
|
||||
#define __SC_recv 10
|
||||
#define __SC_sendto 11
|
||||
#define __SC_recvfrom 12
|
||||
#define __SC_shutdown 13
|
||||
#define __SC_setsockopt 14
|
||||
#define __SC_getsockopt 15
|
||||
#define __SC_sendmsg 16
|
||||
#define __SC_recvmsg 17
|
||||
|
||||
|
||||
#define socketcall(nm, a, b, c, d, e, f) syscall2(__NR_socketcall, __SC_##nm, \
|
||||
(long)(long [6]){ (long)a, (long)b, (long)c, (long)d, (long)e, (long)f })
|
||||
|
||||
|
||||
#undef O_LARGEFILE
|
||||
|
||||
Reference in New Issue
Block a user