When compiling Ruby 2.1.1, I get the following error
make[2]: Entering directory '/tmp/ruby-build.20140228114849.30108/ruby-2.1.1/ext/readline'
compiling readline.c
readline.c: In function ‘Init_readline’:
readline.c:1977:26: error: ‘Function’ undeclared (first use in this function)
rl_pre_input_hook = (Function *)readline_pre_input_hook;
^
readline.c:1977:26: note: each undeclared identifier is reported only once for each function it appears in
readline.c:1977:36: error: expected expression before ‘)’ token
rl_pre_input_hook = (Function *)readline_pre_input_hook;
^
readline.c: At top level:
readline.c:634:1: warning: ‘readline_pre_input_hook’ defined but not used [-Wunused-function]
readline_pre_input_hook(void)
^
Makefile:228: recipe for target 'readline.o' failed
make[2]: *** [readline.o] Error 1
make[2]: Leaving directory '/tmp/ruby-build.20140228114849.30108/ruby-2.1.1/ext/readline'
exts.mk:198: recipe for target 'ext/readline/all' failed
make[1]: *** [ext/readline/all] Error 2
ext/readline/readline.c (Init_readline): Use rl_hook_func_t instead
of Function to support readline-6.3. (rl_hook_func_t is available
since readline-4.2.)
Reported by Dmitry Medvinsky. [ruby-core:61141] [Bug #9578]
ext/readline/readline.c: In function ‘Init_readline’:
ext/readline/readline.c:1977: error: ‘rl_hook_func_t’ undeclared (first use in this function)
ext/readline/readline.c:1977: error: (Each undeclared identifier is reported only once
ext/readline/readline.c:1977: error: for each function it appears in.)
ext/readline/readline.c:1977: error: expected expression before ‘)’ token