pull in linux/types.h in linux/nbd.h
PATCH 1/1 pull in linux/types.h in linux/nbd.h
the nbd header uses __be32 and such types but doesnt actually include the header that defines these things (linux/types.h); so lets include it -mike
the nbd header uses __be32 and such types but doesnt actually include the header that defines these things (linux/types.h); so lets include it
include/linux/nbd.h +2 -0
@@ -15,6 +15,8 @@#ifndef LINUX_NBD_H #define LINUX_NBD_H +#include <linux/types.h> +#define NBD_SET_SOCK _IO( 0xab, 0 )#define NBD_SET_BLKSIZE _IO( 0xab, 1 )#define NBD_SET_SIZE _IO( 0xab, 2 )
Quoted 4 lines
the nbd header uses
__be32and such types but doesnt actually include the header that defines these things (linux/types.h); so lets include it -mike
Hm, <linux/cdev.h> uses struct kobject and should therefore include <linux/kobejct.h>, can you make a patch for that too? Thanks.
-`J'
Quoted 5 lines · Jan Engelhardt
Quoted 2 lines
the nbd header uses
__be32and such types but doesnt actually include the header that defines these things (linux/types.h); so lets include itHm, <
linux/cdev.h> uses struct kobject and should therefore include <linux/kobejct.h>, can you make a patch for that too? Thanks.
linux/cdev.h isnt exported to userspace so i dont really care about it ... if you do, feel free to write the patch yourself. Thanks.
-mike
PATCH 1/1 pull in necessary header files for cdev.h
linux/cdev.h uses struct kobject and other structs and should therefore include them. Currently, a module either needs to add the missing includes itself, or, in case a module includes other headers already, needs to put <linux/cdev.h> last, which goes against a alphabetically-sorted include list.
include/linux/cdev.h +4 -0
@@ -2,6 +2,10 @@#define _LINUX_CDEV_H #ifdef __KERNEL__ +#include <linux/kobject.h> +#include <linux/kdev_t.h> +#include <linux/list.h> + struct cdev { struct kobject kobj; struct module *owner;
#<EOF>
-`J'