mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
os: define SOCK_CLOEXEC on Linux
If it's not already defined, and we are on Linux, #define it. This gets rid of a load of #ifdefs. This should also allow to use it when the kernel supports it, but the libc does not define it. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
1f827a4776
commit
3b29783dc8
3 changed files with 14 additions and 9 deletions
|
|
@ -26,4 +26,17 @@
|
|||
int
|
||||
wl_os_socket_cloexec(int domain, int type, int protocol);
|
||||
|
||||
/*
|
||||
* The following are for wayland-os.c and the unit tests.
|
||||
* Do not use them elsewhere.
|
||||
*/
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
#ifndef SOCK_CLOEXEC
|
||||
#define SOCK_CLOEXEC 02000000
|
||||
#endif
|
||||
|
||||
#endif /* __linux__ */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue