summaryrefslogtreecommitdiff
path: root/pkg/rootless/rootless_linux.c
diff options
context:
space:
mode:
authorMarc Nguyen <nguyen_marc@live.fr>2021-12-10 03:07:20 +0100
committerNguyen Marc <nguyen_marc@live.fr>2021-12-10 14:20:35 +0100
commit1d781ccbeab3364ac18c487f66893847fe5e102f (patch)
tree6db274a8fbcc3be9e30207b0057aa7dc5ba1d397 /pkg/rootless/rootless_linux.c
parentf80a7fda745a96a895184b92077a6356c305c2bb (diff)
downloadpodman-1d781ccbeab3364ac18c487f66893847fe5e102f.tar.gz
podman-1d781ccbeab3364ac18c487f66893847fe5e102f.tar.bz2
podman-1d781ccbeab3364ac18c487f66893847fe5e102f.zip
[NO NEW TESTS NEEDED] rootless: declare TEMP_FAILURE_RETRY before usage (Fixes: #12563)
Signed-off-by: Nguyen Marc <nguyen_marc@live.fr>
Diffstat (limited to 'pkg/rootless/rootless_linux.c')
-rw-r--r--pkg/rootless/rootless_linux.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c
index e71d5d999..92f331ce4 100644
--- a/pkg/rootless/rootless_linux.c
+++ b/pkg/rootless/rootless_linux.c
@@ -19,6 +19,15 @@
#include <sys/select.h>
#include <stdio.h>
+#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 cleanup_free __attribute__ ((cleanup (cleanup_freep)))
#define cleanup_close __attribute__ ((cleanup (cleanup_closep)))
#define cleanup_dir __attribute__ ((cleanup (cleanup_dirp)))
@@ -72,15 +81,6 @@ int rename_noreplace (int olddirfd, const char *oldpath, int newdirfd, const cha
return rename (oldpath, newpath);
}
-#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
-
static const char *_max_user_namespaces = "/proc/sys/user/max_user_namespaces";
static const char *_unprivileged_user_namespaces = "/proc/sys/kernel/unprivileged_userns_clone";