File: socket.h

package info (click to toggle)
rpki-client 9.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,932 kB
  • sloc: ansic: 25,775; sh: 11,620; makefile: 238
file content (24 lines) | stat: -rw-r--r-- 589 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * Public domain
 * sys/socket.h compatibility shim
 */

#include_next <sys/socket.h>

#if !defined(SOCK_CLOEXEC) || !defined(SOCK_NONBLOCK)
#define NEED_SOCKET_FLAGS
int _socket(int domain, int type, int protocol);
int _socketpair(int domain, int type, int protocol, int socket_vector[2]);
#ifndef IN_SOCKET_COMPAT
#define socket(d, t, p) _socket(d, t, p)
#define socketpair(d, t, p, s) _socketpair(d, t, p, s)
#endif
#endif

#ifndef SOCK_NONBLOCK
#define SOCK_NONBLOCK  0x4000 /* set O_NONBLOCK */
#endif

#ifndef SOCK_CLOEXEC
#define SOCK_CLOEXEC  0x8000 /* set FD_CLOEXEC */
#endif