This patch fixes a conflict between the C library getline() function
and gnuchess getline() function.
Patch borrowed from the gnuchess Debian package.
Index: gnuchess-5.07/src/input.c
===================================================================
--- gnuchess-5.07.orig/src/input.c 2009-09-29 16:01:38.000000000 +0200
+++ gnuchess-5.07/src/input.c 2009-09-29 16:02:57.000000000 +0200
pthread_mutex_lock(&input_mutex);
input_status = INPUT_AVAILABLE;
pthread_cond_signal(&input_cond);
pthread_mutex_unlock(&input_mutex);
if (isatty(STDIN_FILENO)) {
- getline = getline_readline;
+ get_line = getline_readline;
- getline = getline_standard;
+ get_line = getline_standard;
- getline = getline_standard;
+ get_line = getline_standard;
pthread_create(&input_thread, NULL, input_func, NULL);
Index: gnuchess-5.07/src/common.h
===================================================================
--- gnuchess-5.07.orig/src/common.h 2009-09-29 16:06:17.000000000 +0200
+++ gnuchess-5.07/src/common.h 2009-09-29 16:06:40.000000000 +0200
* Input routine, initialized to one of the specific
* input routines. The given argument is the prompt.
-void (*getline) (char *);
+void (*get_line) (char *);
extern char inputstr[MAXSTR];