Issue #22463: Correct #endif placement; patch by Senthil Kumaran
diff --git a/Modules/readline.c b/Modules/readline.c
index bfb5d76..3bb0ac8 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -818,6 +818,7 @@
 #endif
 }
 
+#endif
 
 #ifdef HAVE_RL_RESIZE_TERMINAL
 static volatile sig_atomic_t sigwinch_received;
@@ -876,7 +877,6 @@
     }
     return result;
 }
-#endif
 
 
 /* A more flexible constructor that saves the "begidx" and "endidx"