diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c
index 250f1233ea6aa768e226c86cd2914b4a412d689c..1775dffb8341a051756b93cfc16ce8f97c223e1e 100644
--- a/src/bin/psql/input.c
+++ b/src/bin/psql/input.c
@@ -32,7 +32,7 @@ gets_interactive(const char *prompt)
 
 #ifdef USE_READLINE
 	if (useReadline)
-		s = readline(prompt);
+		s = readline((char *) prompt);
 	else
 	{
 #endif
@@ -135,7 +135,7 @@ saveHistory(const char *fname)
 #ifdef USE_HISTORY
 	if (useHistory)
 	{
-		if (write_history(fname) != 0)
+		if (write_history((char *) fname) != 0)
 		{
 			perror(fname);
 			return false;