OSDN Git Service

qemu-nbd: Rename 'exp' variable clashing with math::exp() symbol
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Fri, 11 Jan 2019 16:35:19 +0000 (17:35 +0100)
committerEric Blake <eblake@redhat.com>
Mon, 14 Jan 2019 16:09:46 +0000 (10:09 -0600)
commit9d97658020db922b68da05faadcdd61f49fbbdc7
treefd9e3e73149a15ac88af8926e75a2f4f1b1a4d2e
parent14da540f2a68b3f730b1a7c31de783f3d68f6fc7
qemu-nbd: Rename 'exp' variable clashing with math::exp() symbol

The use of a variable named 'exp' prevents includes to import <math.h>.

Rename it to avoid:

  qemu-nbd.c:64:19: error: ‘exp’ redeclared as different kind of symbol
   static NBDExport *exp;
                     ^~~
  In file included from /usr/include/features.h:428,
                   from /usr/include/bits/libc-header-start.h:33,
                   from /usr/include/stdint.h:26,
                   from /usr/lib/gcc/x86_64-redhat-linux/8/include/stdint.h:9,
                   from /source/qemu/include/qemu/osdep.h:80,
                   from /source/qemu/qemu-nbd.c:19:
  /usr/include/bits/mathcalls.h:95:1: note: previous declaration of ‘exp’ was here
    __MATHCALL_VEC (exp,, (_Mdouble_ __x));
    ^~~~~~~~~~~~~~

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190111163519.11457-1-philmd@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
qemu-nbd.c