]> err.no Git - util-linux/commitdiff
make _IO macros available on Solaris
authorFabian Groffen <grobian@gentoo.org>
Mon, 17 Jan 2011 21:00:35 +0000 (22:00 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 20 Jan 2011 22:31:14 +0000 (23:31 +0100)
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@gentoo.org>
configure.ac
include/blkdev.h

index c38cca43f9e0a286e49a3581e417e168c9104ebf..08c5d11c7ea195e46deebdba4650246e7516b439 100644 (file)
@@ -129,6 +129,7 @@ AC_CHECK_HEADERS(
        sys/disk.h \
        sys/disklabel.h \
        sys/ioctl.h \
+       sys/ioccom.h \
        sys/io.h \
        sys/time.h \
        sys/mkdev.h \
index 86fffcff6390447888297ee3f2775aa3f9b14079..b6c46edde3e0d4d7911a50b0ab491c4e95fc38ae 100644 (file)
@@ -3,6 +3,9 @@
 
 #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>