]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/coredump/coredump.c
Add open_memstream_unlocked() wrapper
[thirdparty/systemd.git] / src / coredump / coredump.c
index 023701646b65e7bf216b4c661d8dedd5ddb29e2e..ac7b972026f23ed0c2adf0027917b5447c6ac1f9 100644 (file)
@@ -2,7 +2,6 @@
 
 #include <errno.h>
 #include <stdio.h>
-#include <stdio_ext.h>
 #include <sys/prctl.h>
 #include <sys/xattr.h>
 #include <unistd.h>
@@ -530,12 +529,10 @@ static int compose_open_fds(pid_t pid, char **open_fds) {
         if (proc_fdinfo_fd < 0)
                 return -errno;
 
-        stream = open_memstream(&buffer, &size);
+        stream = open_memstream_unlocked(&buffer, &size);
         if (!stream)
                 return -ENOMEM;
 
-        (void) __fsetlocking(stream, FSETLOCKING_BYCALLER);
-
         FOREACH_DIRENT(dent, proc_fd_dir, return -errno) {
                 _cleanup_fclose_ FILE *fdinfo = NULL;
                 _cleanup_free_ char *fdname = NULL;