]> xenbits.xensource.com Git - libvirt.git/commit
build: work around super-old readline.h
authorRyota Ozaki <ozaki.ryota@gmail.com>
Mon, 18 Nov 2013 15:39:32 +0000 (00:39 +0900)
committerEric Blake <eblake@redhat.com>
Mon, 18 Nov 2013 23:24:06 +0000 (16:24 -0700)
commit9eb23fe24e17ac4ee91623aede26107c321be7c4
tree4410bf7ff8d10846f801e69bddb9e08b0961a2e6
parent6ce83e91e6d54774f640201e114d0b2b0c134f60
build: work around super-old readline.h

This patch shuts up the following warning of clang
on Mac OS X:

  virsh.c:2761:22: error: assigning to 'char *' from 'const char [6]' discards qualifiers
      [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
      rl_readline_name = "virsh";
                       ^ ~~~~~~~

The warning happens because rl_readline_name on Mac OS X comes
from an old readline header that still uses 'char *', while it
is 'const char *' in readline 4.2 (April 2001) and newer.

Tested on Mac OS X 10.8.5 (clang-500.2.75) and Fedora 19 (gcc 4.8.1).

Signed-off-by: Ryota Ozaki <ozaki.ryota@gmail.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
tools/virsh.c