summaryrefslogtreecommitdiff
path: root/lib/libc/socket/sockatmark.c
blob: 4ae64d95ad54eae742c48e623b42c14a0f9bc601 (plain)
1
2
3
4
5
6
7
8
9
10
#include "asm/unistd_64.h" // for __NR_ioctl

#include <asm-generic/sockios.h> // for SIOCATMARK
#include <syscall.h>		 // for __syscall_3, syscall

int sockatmark(int s)
{
	int arg = 0;
	return syscall(ioctl, s, SIOCATMARK, &arg) < 0 ? -1 : arg;
}