qemu-devel.nongnu.org archive mirror
 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

* Re: [Qemu-devel] [PATCH] compiler.h include fix for usb-linux.c
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Thiemo Seufer @ 2007-01-10 19:55 UTC (permalink / raw)
  To: ( ???????????? ?????????????????? ) Ameya Palande; +Cc: qemu-devel

( ???????????? ?????????????????? ) Ameya Palande wrote:
> 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.

JFTR, it works on debian.


Thiemo

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

* Re: [Qemu-devel] [PATCH] compiler.h include fix for usb-linux.c
  2007-01-10 19:55 ` Thiemo Seufer
@ 2007-01-10 23:00   ` ( अमेय पाळंदे ) Ameya Palande
  2007-01-10 23:18     ` Lonnie Mendez
  0 siblings, 1 reply; 4+ messages in thread
From: ( अमेय पाळंदे ) Ameya Palande @ 2007-01-10 23:00 UTC (permalink / raw)
  To: Thiemo Seufer; +Cc: qemu-devel

On 1/10/07, Thiemo Seufer <ths@networkno.de> wrote:
> ( ???????????? ?????????????????? ) Ameya Palande wrote:
> > 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.
>
> JFTR, it works on debian.
>
>
> Thiemo
>

It works on debian because on debian /usr/include/linux/usbdevice_fs.h file
includes <linux/compiler.h>

Regards,
Ameya.

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

* Re: [Qemu-devel] [PATCH] compiler.h include fix for usb-linux.c
  2007-01-10 23:00   ` ( अमेय पाळंदे ) Ameya Palande
@ 2007-01-10 23:18     ` Lonnie Mendez
  0 siblings, 0 replies; 4+ messages in thread
From: Lonnie Mendez @ 2007-01-10 23:18 UTC (permalink / raw)
  To: qemu-devel

On Thu, 2007-01-11 at 00:00 +0100, ( अमेय पाळंदे ) Ameya Palande wrote:
> On 1/10/07, Thiemo Seufer <ths@networkno.de> wrote:
> > ( ???????????? ?????????????????? ) Ameya Palande wrote:
> > > 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.
> >
> > JFTR, it works on debian.
> >
> >
> > Thiemo
> >
> 
> It works on debian because on debian /usr/include/linux/usbdevice_fs.h file
> includes <linux/compiler.h>

The issue before is that usb-linux.c should not be including
linux/compiler.h.  See the xen approach to fixing this for the broken
distros:

http://xenbits2.xensource.com/xen-unstable.hg?rev/ba7487569374;style=rev
%3Dusb

^ 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).