diff options
author | Ryan Lortie <desrt@desrt.ca> | 2014-06-20 14:43:26 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2014-06-20 16:00:48 -0400 |
commit | 9362a1b2d987125a8aa0723b916d29aaaece329a (patch) | |
tree | b1284963e2d8fb9f806725808dc33482cf75b087 /configure.ac | |
parent | bef557e55d8ab89b324ff2099b2621254aeb3929 (diff) | |
download | glib-9362a1b2d987125a8aa0723b916d29aaaece329a.tar.gz glib-9362a1b2d987125a8aa0723b916d29aaaece329a.tar.bz2 glib-9362a1b2d987125a8aa0723b916d29aaaece329a.zip |
configure.ac: fix check for futex and eventfd
We were using AC_LANG_PROGRAM to build a program to test for our ability
to call syscall (__NR_futex, ...);. This macro adds "main () { ... }"
around the provided code segment automatically. The provided code
segment provided its own main() function, however.
The result looked something like:
int main (void) {
int main (void) {
...
}
}
which worked on GCC, but not on clang.
Let's fix that. Let's fix the same mistake copied over for eventfd()
detection while we're at it.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac index 6b6ab55ec..f5487fbd6 100644 --- a/configure.ac +++ b/configure.ac @@ -2386,13 +2386,7 @@ AC_CACHE_CHECK(for futex(2) system call, #include <sys/syscall.h> #include <unistd.h> ],[ -int -main (void) -{ - /* it is not like this actually runs or anything... */ syscall (__NR_futex, NULL, FUTEX_WAKE, FUTEX_WAIT); - return 0; -} ])],glib_cv_futex=yes,glib_cv_futex=no)) if test x"$glib_cv_futex" = xyes; then AC_DEFINE(HAVE_FUTEX, 1, [we have the futex(2) system call]) @@ -2403,12 +2397,7 @@ AC_CACHE_CHECK(for eventfd(2) system call, #include <sys/eventfd.h> #include <unistd.h> ],[ -int -main (void) -{ eventfd (0, EFD_CLOEXEC); - return 0; -} ])],glib_cv_eventfd=yes,glib_cv_eventfd=no)) if test x"$glib_cv_eventfd" = x"yes"; then AC_DEFINE(HAVE_EVENTFD, 1, [we have the eventfd(2) system call]) |