emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 8fa624b: Improve compatibility with musl-libc (Bug#48789)


From: Philipp Stephani
Subject: master 8fa624b: Improve compatibility with musl-libc (Bug#48789)
Date: Sun, 29 Aug 2021 14:53:37 -0400 (EDT)

branch: master
commit 8fa624b39b39569d280b06811dd81f1253559e17
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>

    Improve compatibility with musl-libc (Bug#48789)
    
    * lib-src/seccomp-filter.c (export_filter): Remove use of
    nonstandard macro TEMP_FAILURE_RETRY.
---
 lib-src/seccomp-filter.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib-src/seccomp-filter.c b/lib-src/seccomp-filter.c
index dc568e0..d378e0b 100644
--- a/lib-src/seccomp-filter.c
+++ b/lib-src/seccomp-filter.c
@@ -131,9 +131,12 @@ export_filter (const char *file,
                int (*function) (const scmp_filter_ctx, int),
                const char *name)
 {
-  int fd = TEMP_FAILURE_RETRY (
-    open (file, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_CLOEXEC,
-          0644));
+  int fd;
+  do
+    fd = open (file,
+               O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_CLOEXEC,
+               0644);
+  while (fd < 0 && errno == EINTR);
   if (fd < 0)
     fail (errno, "open %s", file);
   int status = function (ctx, fd);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]