[gdb/readline] Fix link error on MinGW due to missing 'alarm'

The previous solution used symbols that exist only in MinGW64.
  Add a stub implementation of 'alarm' for mingw.org's MinGW.

(cherry picked from commit d46fdacc09)
This commit is contained in:
Eli Zaretskii
2025-01-04 12:19:55 +02:00
parent 9bc042a41b
commit 947a9c38e7

View File

@@ -151,6 +151,14 @@ win32_isatty (int fd)
# define RL_TIMEOUT_USE_SELECT
#else
# define RL_TIMEOUT_USE_SIGALRM
# ifdef __MINGW32_MAJOR_VERSION
/* mingw.org's MinGW doesn't have 'alarm'. */
unsigned int
alarm (unsigned int seconds)
{
return 0;
}
# endif
#endif
int rl_set_timeout (unsigned int, unsigned int);