mirror of
https://github.com/devkitPro/wut.git
synced 2026-03-21 17:34:47 -05:00
Some checks failed
C/C++ CI / ubuntu-latest (push) Has been cancelled
`find . -regex '.*\.\(cpp\|hpp\|cu\|cuh\|c\|h\)' -exec clang-format -style=file -i {} \;`
20 lines
342 B
C
20 lines
342 B
C
#include "wut_socket.h"
|
|
|
|
int
|
|
sockatmark(int sockfd)
|
|
{
|
|
char buf[1];
|
|
int rc;
|
|
|
|
sockfd = __wut_get_nsysnet_fd(sockfd);
|
|
|
|
rc = RPLWRAP(recv)(sockfd, buf, sizeof(buf), MSG_OOB | MSG_PEEK | MSG_DONTWAIT);
|
|
if (rc > 0) {
|
|
return 1;
|
|
}
|
|
|
|
rc = __wut_get_nsysnet_result(NULL, rc);
|
|
|
|
return (errno == EWOULDBLOCK) ? 0 : rc;
|
|
}
|