All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] compiler.h include fix for usb-linux.c
@ 2007-01-10 19:37 ( अमेय पाळंदे ) Ameya Palande
  2007-01-10 19:55 ` Thiemo Seufer
  0 siblings, 1 reply; 4+ messages in thread
From: ( अमेय पाळंदे ) Ameya Palande @ 2007-01-10 19:37 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 374 bytes --]

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.

[-- Attachment #2: compiler-h-fix.patch --]
[-- Type: text/x-patch, Size: 1010 bytes --]

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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-01-10 23:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-10 19:37 [Qemu-devel] [PATCH] compiler.h include fix for usb-linux.c ( अमेय पाळंदे ) Ameya Palande
2007-01-10 19:55 ` Thiemo Seufer
2007-01-10 23:00   ` ( अमेय पाळंदे ) Ameya Palande
2007-01-10 23:18     ` Lonnie Mendez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.