qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "( अमेय पाळंदे ) Ameya Palande" <2ameya@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] compiler.h include fix for usb-linux.c
Date: Wed, 10 Jan 2007 20:37:28 +0100	[thread overview]
Message-ID: <269694c00701101137y1bbd0e22i4b276aabb73c9622@mail.gmail.com> (raw)

[-- 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>

             reply	other threads:[~2007-01-10 19:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-10 19:37 ( अमेय पाळंदे ) Ameya Palande [this message]
2007-01-10 19:55 ` [Qemu-devel] [PATCH] compiler.h include fix for usb-linux.c Thiemo Seufer
2007-01-10 23:00   ` ( अमेय पाळंदे ) Ameya Palande
2007-01-10 23:18     ` Lonnie Mendez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=269694c00701101137y1bbd0e22i4b276aabb73c9622@mail.gmail.com \
    --to=2ameya@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).