]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
update-linux-headers: Rename SW_MAX to SW_MAX_
authorMarkus Armbruster <armbru@redhat.com>
Thu, 8 Oct 2015 16:11:39 +0000 (18:11 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 28 Oct 2015 19:45:14 +0000 (14:45 -0500)
The next commit will compile hw/input/virtio-input.c and
hw/input/virtio-input-hid.c even when CONFIG_LINUX is off.  These
files include both "include/standard-headers/linux/input.h" and
<windows.h> then.  Doesn't work, because both define SW_MAX.  We don't
actually use it.  Patch input.h to define SW_MAX_ instead.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1444320700-26260-2-git-send-email-armbru@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit ac98fa849e834f48e5a64cf4b22218ba4047e142)

Conflicts:
scripts/update-linux-headers.sh

* remove dependency on eddb4de3

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
include/standard-headers/linux/input.h
scripts/update-linux-headers.sh

index b003c670590f78a68a9377a4b84bff2231275bf8..43f1850b6b952bcca3c5fa96ddb4ba8b03dad799 100644 (file)
@@ -887,8 +887,8 @@ struct input_keymap_entry {
 #define SW_ROTATE_LOCK         0x0c  /* set = rotate locked/disabled */
 #define SW_LINEIN_INSERT       0x0d  /* set = inserted */
 #define SW_MUTE_DEVICE         0x0e  /* set = device disabled */
-#define SW_MAX                 0x0f
-#define SW_CNT                 (SW_MAX+1)
+#define SW_MAX_                        0x0f
+#define SW_CNT                 (SW_MAX_+1)
 
 /*
  * Misc events
index f0e830c2d6b082130c070d1996f3ebcf16842bdc..201032846c9f05a34bf1077ff538dc3b4403ee33 100755 (executable)
@@ -57,6 +57,7 @@ cp_virtio() {
                 -e 's/__attribute__((packed))/QEMU_PACKED/' \
                 -e 's/__inline__/inline/' \
                 -e '/sys\/ioctl.h/d' \
+                -e 's/SW_MAX/SW_MAX_/' \
                 "$f" > "$to/$header";
         done
     fi