enable_hostname_completion is not declared without readline

---
xoxo iza
From 38e94c427a1b87680b54c3820777ed55c662f90e Mon Sep 17 00:00:00 2001
From: izabera <izaber...@gmail.com>
Date: Sat, 19 Nov 2016 20:15:47 +0100
Subject: [PATCH] add ifdef for readline in shopt.def

---
 builtins/shopt.def | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/builtins/shopt.def b/builtins/shopt.def
index 2febb7e..240ad41 100644
--- a/builtins/shopt.def
+++ b/builtins/shopt.def
@@ -121,7 +121,6 @@ extern int debugging_mode;
 static void shopt_error __P((char *));
 
 static int set_shellopts_after_change __P((char *, int));
-static int shopt_enable_hostname_completion __P((char *, int));
 static int set_compatibility_level __P((char *, int));
 
 #if defined (RESTRICTED_SHELL)
@@ -130,6 +129,7 @@ static int set_restricted_shell __P((char *, int));
 
 #if defined (READLINE)
 static int shopt_set_complete_direxpand __P((char *, int));
+static int shopt_enable_hostname_completion __P((char *, int));
 #endif
 
 static int shopt_set_debug_mode __P((char *, int));
@@ -576,6 +576,7 @@ shopt_set_debug_mode (option_name, mode)
   return (0);
 }
 
+#if defined (READLINE)
 static int
 shopt_enable_hostname_completion (option_name, mode)
      char *option_name;
@@ -583,6 +584,7 @@ shopt_enable_hostname_completion (option_name, mode)
 {
   return (enable_hostname_completion (mode));
 }
+#endif
 
 static int
 set_compatibility_level (option_name, mode)
-- 
2.10.2

Reply via email to