From: Richard Jones Date: Thu, 20 May 2010 09:11:18 +0000 (+0100) Subject: fish: Fix build error if built without readline. X-Git-Tag: 1.2.8~6 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=00dcc4084e1f581d6eb98508431c51c83ae014b4;p=libguestfs.git fish: Fix build error if built without readline. fish.c:1447: error: 'add_history_line' defined but not used [-Wunused-function] (Reported by Matt Booth) (cherry picked from commit 5af010c96d687a7cf5251107a74770a231f42b77) --- diff --git a/fish/fish.c b/fish/fish.c index 3f798fd..48ba459 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -61,7 +61,9 @@ static void script (int prompt); static void cmdline (char *argv[], int optind, int argc); static void initialize_readline (void); static void cleanup_readline (void); +#ifdef HAVE_LIBREADLINE static void add_history_line (const char *); +#endif /* Currently open libguestfs handle. */ guestfs_h *g; @@ -1338,14 +1340,14 @@ cleanup_readline (void) #endif } +#ifdef HAVE_LIBREADLINE static void add_history_line (const char *line) { -#ifdef HAVE_LIBREADLINE add_history (line); nr_history_lines++; -#endif } +#endif int xwrite (int fd, const void *v_buf, size_t len)