mirror of
https://github.com/LibreELEC/LibreELEC.tv
synced 2025-09-24 19:46:01 +07:00
42 lines
1.1 KiB
Diff
42 lines
1.1 KiB
Diff
diff -Naur a/configure.ac b/configure.ac
|
|
--- a/configure.ac 2016-10-22 06:21:56.000000000 +0200
|
|
+++ b/configure.ac 2016-12-26 21:54:42.489330474 +0100
|
|
@@ -277,36 +277,7 @@
|
|
AM_CONDITIONAL([BUILD_ALSA_SB_RC],[false])
|
|
fi
|
|
|
|
-dnl see https://daniel.haxx.se/blog/2016/10/11/poll-on-mac-10-12-is-broken/
|
|
-AC_MSG_CHECKING(for working poll(2))
|
|
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[
|
|
- #include <errno.h>
|
|
- #include <fcntl.h>
|
|
- #include <poll.h>
|
|
- #include <stdio.h>
|
|
- #include <sys/time.h>
|
|
-]],[[
|
|
- int fd = open("/dev/tty", O_RDONLY);
|
|
- if (fd == -1) return 2;
|
|
- struct pollfd pfd = {fd, 1, 0};
|
|
-
|
|
- struct timeval before, after;
|
|
- gettimeofday(&before, NULL);
|
|
- int rc = poll(&pfd, 1, 500);
|
|
- if (rc < 0) return errno;
|
|
- if (rc > 0) return rc;
|
|
- gettimeofday(&after, NULL);
|
|
-
|
|
- suseconds_t us = (after.tv_sec - before.tv_sec) * 1000000 +
|
|
- (after.tv_usec - before.tv_usec);
|
|
- return us >= 400000 ? 0 : 1;
|
|
-]])],[
|
|
- AC_DEFINE(HAVE_POLL_FINE)
|
|
- AC_MSG_RESULT(yes)
|
|
-],[
|
|
- AC_MSG_RESULT(no)
|
|
-])
|
|
-
|
|
+AC_DEFINE(HAVE_POLL_FINE)
|
|
|
|
dnl check for kernel-headers
|
|
AC_CHECK_HEADERS([linux/input.h],
|