[systemd-devel] [patch] #include src/shared/missing.h in src/shared/util.h for missing struct file_handle definition

Samuli Suominen ssuominen at gentoo.org
Fri Aug 1 07:43:59 PDT 2014


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Include-missing.h-in-util.h-for-missing-struct-file_.patch
Type: text/x-patch
Size: 583 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140801/084b01cb/attachment.bin>


More information about the systemd-devel mailing list