chiark / gitweb /
sd-bus: don't include internal header memfd.h in public header sd-bus.h
[elogind.git] / src / libsystemd / sd-bus / bus-message.c
index 3e60842172d2d7356e8eb952011d0d8bbcf9bcf4..d00455a1121de100b01e64cb5a61e6c550a47398 100644 (file)
@@ -28,6 +28,7 @@
 #include "strv.h"
 #include "time-util.h"
 #include "cgroup-util.h"
+#include "memfd.h"
 
 #include "sd-bus.h"
 #include "bus-message.h"
@@ -2840,7 +2841,7 @@ int bus_body_part_map(struct bus_body_part *part) {
         psz = PAGE_ALIGN(part->size);
 
         if (part->memfd >= 0)
-                p = mmap(NULL, psz, PROT_READ, MAP_SHARED, part->memfd, 0);
+                p = mmap(NULL, psz, PROT_READ, MAP_PRIVATE, part->memfd, 0);
         else if (part->is_zero)
                 p = mmap(NULL, psz, PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
         else