1
0
mirror of https://github.com/projectatomic/bubblewrap.git synced 2026-02-05 15:45:22 +01:00

utils: Move TEMP_FAILURE_RETRY reimplementation here

This will allow it to be used in more places.

Helps: https://github.com/containers/bubblewrap/issues/657
Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2024-10-03 17:16:59 +01:00
parent 2a552429ec
commit 654a25d408
2 changed files with 9 additions and 9 deletions

View File

@@ -44,15 +44,6 @@
#define CLONE_NEWCGROUP 0x02000000 /* New cgroup namespace */
#endif
#ifndef TEMP_FAILURE_RETRY
#define TEMP_FAILURE_RETRY(expression) \
(__extension__ \
({ long int __result; \
do __result = (long int) (expression); \
while (__result == -1L && errno == EINTR); \
__result; }))
#endif
/* We limit the size of a tmpfs to half the architecture's address space,
* to avoid hitting arbitrary limits in the kernel.
* For example, on at least one x86_64 machine, the actual limit seems to be

View File

@@ -46,6 +46,15 @@
#define FALSE 0
typedef int bool;
#ifndef TEMP_FAILURE_RETRY
#define TEMP_FAILURE_RETRY(expression) \
(__extension__ \
({ long int __result; \
do __result = (long int) (expression); \
while (__result == -1L && errno == EINTR); \
__result; }))
#endif
#define PIPE_READ_END 0
#define PIPE_WRITE_END 1