-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
31e4ba3
commit fd71902
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
From 1d781ccbeab3364ac18c487f66893847fe5e102f Mon Sep 17 00:00:00 2001 | ||
From: Marc Nguyen <nguyen_marc@live.fr> | ||
Date: Fri, 10 Dec 2021 03:07:20 +0100 | ||
Subject: [PATCH] [NO NEW TESTS NEEDED] rootless: declare TEMP_FAILURE_RETRY | ||
before usage (Fixes: #12563) | ||
|
||
Signed-off-by: Nguyen Marc <nguyen_marc@live.fr> | ||
--- | ||
pkg/rootless/rootless_linux.c | 18 +++++++++--------- | ||
1 file changed, 9 insertions(+), 9 deletions(-) | ||
|
||
diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c | ||
index e71d5d999fe..92f331ce493 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"; | ||
|