diff options
author | Richard Jones <rjones@redhat.com> | 2010-05-20 10:11:18 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-05-20 10:30:12 +0100 |
commit | 5af010c96d687a7cf5251107a74770a231f42b77 (patch) | |
tree | 206e0f3309476df4f0aedfbf5e6163d062beaa38 /fish | |
parent | 6e10a24df0361b3e33cdfa4f0c16018a796f8b78 (diff) | |
download | libguestfs-5af010c96d687a7cf5251107a74770a231f42b77.tar.gz libguestfs-5af010c96d687a7cf5251107a74770a231f42b77.tar.xz libguestfs-5af010c96d687a7cf5251107a74770a231f42b77.zip |
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)
Diffstat (limited to 'fish')
-rw-r--r-- | fish/fish.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fish/fish.c b/fish/fish.c index a630cdca..06ce960d 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -65,7 +65,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 static void print_shell_quote (FILE *stream, const char *str); /* Currently open libguestfs handle. */ @@ -1443,14 +1445,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) |