QEMU_BUILD_BUG_ON: use __COUNTER__
commit60abf0a5e05134187e274ce5f32524ccf0cae1a6
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 31 Jan 2017 14:29:51 +0000 (31 16:29 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 1 Feb 2017 01:37:17 +0000 (1 03:37 +0200)
tree0039235376ddce1664c77e6425177138c3b8449e
parent32f825dece6482297fc1b9b0e3bf31424529688a
QEMU_BUILD_BUG_ON: use __COUNTER__

Some headers use QEMU_BUILD_BUG_ON. This causes a problem
if the C file including that header happens to have
QEMU_BUILD_BUG_ON at the same line number.

Fix using a widely available extension: __COUNTER__.
If unavailable, provide a stub.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
include/qemu/compiler.h