mirror of
https://github.com/fluencelabs/musl
synced 2025-06-28 06:02:04 +00:00
initial check-in, version 0.5.0
This commit is contained in:
13
src/network/getsockopt.c
Normal file
13
src/network/getsockopt.c
Normal file
@ -0,0 +1,13 @@
|
||||
#include <sys/socket.h>
|
||||
#include "syscall.h"
|
||||
#include "socketcall.h"
|
||||
|
||||
int getsockopt(int fd, int level, int optname, void *optval, socklen_t *optlen)
|
||||
{
|
||||
unsigned long args[] = {
|
||||
fd, level, optname,
|
||||
(unsigned long)optval,
|
||||
(unsigned long)optlen
|
||||
};
|
||||
return syscall2(__NR_socketcall, SYS_GETSOCKOPT, (long)args);
|
||||
}
|
Reference in New Issue
Block a user