The _IO macro is defined in sys/ioccom.h on various platforms. However, on Solaris it isn't included by ioctl.h, so include it explicitly if available. Signed-off-by: Fabian Groffen <grobian@xxxxxxxxxx> diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -129,6 +129,7 @@ sys/disk.h \ sys/disklabel.h \ sys/ioctl.h \ + sys/ioccom.h \ sys/io.h \ sys/time.h \ sys/mkdev.h \ diff --git a/include/blkdev.h b/include/blkdev.h --- a/include/blkdev.h +++ b/include/blkdev.h @@ -1,8 +1,15 @@ #ifndef BLKDEV_H #define BLKDEV_H +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <sys/types.h> #include <sys/ioctl.h> +#ifdef HAVE_SYS_IOCCOM_H +#include <sys/ioccom.h> /* for _IO macro on e.g. Solaris */ +#endif #include <fcntl.h> #include <unistd.h> diff --git a/shlibs/blkid/src/topology/evms.c b/shlibs/blkid/src/topology/evms.c --- a/shlibs/blkid/src/topology/evms.c +++ b/shlibs/blkid/src/topology/evms.c @@ -16,6 +16,9 @@ #include <stdlib.h> #include <string.h> #include <sys/ioctl.h> +#ifdef HAVE_SYS_IOCCOM_H +#include <sys/ioccom.h> +#endif #include <sys/stat.h> #include <sys/types.h> #ifdef HAVE_SYS_MKDEV_H diff --git a/shlibs/blkid/src/topology/md.c b/shlibs/blkid/src/topology/md.c --- a/shlibs/blkid/src/topology/md.c +++ b/shlibs/blkid/src/topology/md.c @@ -16,6 +16,9 @@ #include <stdlib.h> #include <string.h> #include <sys/ioctl.h> +#ifdef HAVE_SYS_IOCCOM_H +#include <sys/ioccom.h> +#endif #include <sys/stat.h> #include <sys/types.h> #ifdef HAVE_SYS_MKDEV_H -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html