diff --git a/configure.ac b/configure.ac index 888ee9e..94221d2 100644 --- a/configure.ac +++ b/configure.ac @@ -235,6 +235,6 @@ XMP_TRY_COMPILE(whether compiler understands -Wunused-result, int main(){}], CFLAGS="${CFLAGS} -Wno-unused-result") -AC_CHECK_FUNCS(kill getopt_long) +AC_CHECK_FUNCS(kill getopt_long tcgetpgrp) AC_CONFIG_FILES([Makefile src/Makefile]) AC_OUTPUT diff --git a/src/main.c b/src/main.c index 925e0bf..7ce9cd0 100644 --- a/src/main.c +++ b/src/main.c @@ -83,7 +83,7 @@ static void sigtstp_handler(int n) static void sigcont_handler(int sig) { -#ifdef HAVE_TERMIOS_H +#if defined(HAVE_TERMIOS_H) && defined(HAVE_TCGETPGRP) unsigned int old_in = foreground_in; foreground_in = tcgetpgrp(STDIN_FILENO) == getpgrp();