Only include update_lines_cols() function when it's actually going to be used
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 137c580..922f351 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -2319,6 +2319,7 @@
 
 /* Internal helper used for updating curses.LINES, curses.COLS, _curses.LINES
  * and _curses.COLS */
+#if defined(HAVE_CURSES_RESIZETERM) || defined(HAVE_CURSES_RESIZE_TERM)
 static int
 update_lines_cols(void)
 {
@@ -2363,6 +2364,7 @@
   Py_DECREF(m);
   return 1;
 }
+#endif
 
 #ifdef HAVE_CURSES_RESIZETERM
 static PyObject *