chiark / gitweb /
Prep v228: Substitute declaration masks (1/4)
[elogind.git] / src / basic / memfd-util.c
index fef163457e4fd24d45a28f8ea3153f6a55540eb9..a103a6fae0535601e8b3ab5db027f22c4f5b5e82 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <stdio.h>
 #include <fcntl.h>
-#include <sys/mman.h>
-#include <sys/prctl.h>
-
 #ifdef HAVE_LINUX_MEMFD_H
 #  include <linux/memfd.h>
 #endif
+#include <stdio.h>
+#include <sys/mman.h>
+#include <sys/prctl.h>
 
-#include "util.h"
+#include "alloc-util.h"
+#include "fd-util.h"
 #include "memfd-util.h"
-#include "utf8.h"
 #include "missing.h"
+#include "string-util.h"
+#include "utf8.h"
+#include "util.h"
 
 int memfd_new(const char *name) {
         _cleanup_free_ char *g = NULL;
@@ -109,6 +111,8 @@ int memfd_set_sealed(int fd) {
         return 0;
 }
 
+/// UNNEEDED by elogind
+#if 0
 int memfd_get_sealed(int fd) {
         int r;
 
@@ -121,8 +125,6 @@ int memfd_get_sealed(int fd) {
         return r == (F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE | F_SEAL_SEAL);
 }
 
-/// UNNEEDED by elogind
-#if 0
 int memfd_get_size(int fd, uint64_t *sz) {
         struct stat stat;
         int r;