Mike Frysinger pointed out util.h is using a struct defined in missing.h
but doesn't #include it:

util.h has:

union file_handle_union {
        struct file_handle handle;
        char padding[sizeof(struct file_handle) + MAX_HANDLE_SZ];
};

missing.h has:

#if !HAVE_DECL_NAME_TO_HANDLE_AT
struct file_handle {
        unsigned int handle_bytes;
        int handle_type;
        unsigned char f_handle[0];
};

static inline int name_to_handle_at(int fd, const char *name, struct
file_handle *handle, int *mnt_id, int flags) {
        return syscall(__NR_name_to_handle_at, fd, name, handle, mnt_id,
flags);
}
#endif

Please, #include "missing.h" in src/shared/util.h to fix the build for
old systems w/ no system header defining
the struct

Thanks!

- Samuli
>From 4e44677efbcc586716fe65ed044836877315b3f0 Mon Sep 17 00:00:00 2001
From: Samuli Suominen <ssuomi...@gentoo.org>
Date: Fri, 1 Aug 2014 17:38:38 +0300
Subject: [PATCH] Include missing.h in util.h for missing struct file_handle
 definition

---
 src/shared/util.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/shared/util.h b/src/shared/util.h
index 4529480..bfbcbcd 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -84,6 +84,7 @@
 #endif
 
 #include "macro.h"
+#include "missing.h"
 #include "time-util.h"
 
 /* What is interpreted as whitespace? */
-- 
2.0.2

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to