aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src/seccomp-filter.c
diff options
context:
space:
mode:
authorPhilipp Stephani2021-08-29 20:51:39 +0200
committerPhilipp Stephani2021-08-29 20:51:39 +0200
commit8fa624b39b39569d280b06811dd81f1253559e17 (patch)
tree4fcd1836a815ce8c02536e41352c429cc7b43086 /lib-src/seccomp-filter.c
parenta2a0b70c8bf03ee0ad57f97b06b1d591dc8801f1 (diff)
downloademacs-8fa624b39b39569d280b06811dd81f1253559e17.tar.gz
emacs-8fa624b39b39569d280b06811dd81f1253559e17.zip
Improve compatibility with musl-libc (Bug#48789)
* lib-src/seccomp-filter.c (export_filter): Remove use of nonstandard macro TEMP_FAILURE_RETRY.
Diffstat (limited to 'lib-src/seccomp-filter.c')
-rw-r--r--lib-src/seccomp-filter.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib-src/seccomp-filter.c b/lib-src/seccomp-filter.c
index dc568e035b5..d378e0b0278 100644
--- a/lib-src/seccomp-filter.c
+++ b/lib-src/seccomp-filter.c
@@ -131,9 +131,12 @@ export_filter (const char *file,
131 int (*function) (const scmp_filter_ctx, int), 131 int (*function) (const scmp_filter_ctx, int),
132 const char *name) 132 const char *name)
133{ 133{
134 int fd = TEMP_FAILURE_RETRY ( 134 int fd;
135 open (file, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_CLOEXEC, 135 do
136 0644)); 136 fd = open (file,
137 O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_CLOEXEC,
138 0644);
139 while (fd < 0 && errno == EINTR);
137 if (fd < 0) 140 if (fd < 0)
138 fail (errno, "open %s", file); 141 fail (errno, "open %s", file);
139 int status = function (ctx, fd); 142 int status = function (ctx, fd);