( अमेय पाळंदे ) Ameya Palande
Wed, 10 Jan 2007 11:38:25 -0800
Hi, Redhat and its derivatives don't have /usr/include/linux/compiler.h But debian, opensuse etc. have compiler.h Without including compiler.h in usb-linux.c build fails on opensuse. So instead of removing compiler.h, its better to check if it is there on build host and if it is there then include it. patch is made against qemu-snapshot-2007-01-10_05 Regards, Ameya.
diff -ur qemu-snapshot-2007-01-10_05/configure qemu-snapshot-2007-01-10_05.new/configure --- qemu-snapshot-2007-01-10_05/configure 2007-01-05 22:25:54.000000000 +0100 +++ qemu-snapshot-2007-01-10_05.new/configure 2007-01-10 20:41:08.000000000 +0100 @@ -749,7 +749,9 @@ if [ "$build_docs" = "yes" ] ; then echo "BUILD_DOCS=yes" >> $config_mak fi - +if test -f "/usr/include/linux/compiler.h" ; then + echo "#define HAVE_COMPILER_H 1" >> $config_h +fi # XXX: suppress that if [ "$bsd" = "yes" ] ; then echo "#define O_LARGEFILE 0" >> $config_h diff -ur qemu-snapshot-2007-01-10_05/usb-linux.c qemu-snapshot-2007-01-10_05.new/usb-linux.c --- qemu-snapshot-2007-01-10_05/usb-linux.c 2006-12-10 23:11:04.000000000 +0100 +++ qemu-snapshot-2007-01-10_05.new/usb-linux.c 2007-01-10 20:34:08.000000000 +0100 @@ -24,6 +24,9 @@ #include "vl.h" #if defined(__linux__) +#ifdef HAVE_COMPILER_H +#include <linux/compiler.h> +#endif #include <dirent.h> #include <sys/ioctl.h> #include <linux/usbdevice_fs.h>
_______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel