diff --git a/src/sqsh_readline.c b/src/sqsh_readline.c
index 2ec565d..f30c119 100644
--- a/src/sqsh_readline.c
+++ b/src/sqsh_readline.c
@@ -159,7 +159,7 @@ int sqsh_readline_init()
 
     rl_readline_name                 = "sqsh" ;
     rl_completion_entry_function     = (rl_compentry_func_t*)sqsh_completion ;
-    rl_attempted_completion_function = (CPPFunction*)sqsh_completion ;
+    rl_attempted_completion_function = (rl_completion_func_t*)sqsh_completion ;
 
     /*
      * sqsh-2.1.8 - Remove '@' and '$' from the readline default list of word break
