This change

--- ../bash-5.3~rc1/lib/readline/terminal.c 2025-01-24 16:45:27.000000000 +0100
+++ lib/readline/terminal.c     2025-05-16 14:51:07.000000000 +0200
@@ -102,12 +102,20 @@

 static int tcap_initialized;

-#if !defined (__linux__) && !defined (NCURSES_VERSION)
-#  if defined (__EMX__) || defined (NEED_EXTERN_PC)
+/* Systems for which PC/BC/UP are defined in the curses library and need an
+   extern definition here. */
+#if !defined (__linux__) && !defined (__gnu_hurd__) && !defined (NCURSES_VERSION)
+#  define NEED_EXTERN_PC
+#endif /* !__linux__ && !__gnu_hurd__ && !NCURSES_VERSION */
+
+#if defined (__EMX__)
+#  define NEED_EXTERN_PC
+#endif
+
+#if defined (NEED_EXTERN_PC)
 extern
-#  endif /* __EMX__ || NEED_EXTERN_PC */
+#  endif /* NEED_EXTERN_PC */
 char PC, *BC, *UP;
-#endif /* !__linux__ && !NCURSES_VERSION */

/* Some strings to control terminal actions. These are output by tputs (). */
 char *_rl_term_clreol;

breaks a static bash build:

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libtinfo.a(lib_termcap.o):(.bss+0 x8): multiple definition of `UP'; ./lib/readline/libreadline.a(terminal.o):/usr/include/termcap.h:56: fir
st defined here
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libtinfo.a(lib_termcap.o):(.bss+0 x0): multiple definition of `BC'; ./lib/readline/libreadline.a(terminal.o):/usr/include/termcap.h:57: fir
st defined here
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libtinfo.a(lib_tputs.o):(.bss+0x6 ): multiple definition of `PC'; ./lib/readline/libreadline.a(terminal.o):/usr/include/termcap.h:55: first
 defined here

Reply via email to