summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartyn Russell <martyn@lanedo.com>2011-09-26 15:04:05 +0100
committerMartyn Russell <martyn@lanedo.com>2011-10-06 17:14:58 +0100
commit573439a5f0d1cf05f2a259a0134ca97997d91aac (patch)
treeb79a6e958a57516796041af2b0f5912bde3bbe8e
parentc88329eceaf162dfa593bb300746d56859b741d5 (diff)
downloadtracker-573439a5f0d1cf05f2a259a0134ca97997d91aac.tar.gz
libtracker-common: Disable configure.ac checks for ioprio_set()
We expect this to be defined for all linux architectures and now use #ifdef __linux__ instead. This should avoid errors like: checking if we have ioprio... configure: error: cross-compiling: please set 'tracker_cv_have_ioprio'
-rw-r--r--configure.ac26
-rw-r--r--src/libtracker-common/tracker-ioprio.c15
2 files changed, 8 insertions, 33 deletions
diff --git a/configure.ac b/configure.ac
index 26a2daf44..f79d50f1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -148,31 +148,6 @@ if test "x$have_function" = "xno" ; then
[Defined for compilers not supporting __FUNCTION__])
fi
-# Check ioprio support
-AC_CACHE_CHECK([if we have ioprio],[tracker_cv_have_ioprio],
- [AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([[
- #include <stdlib.h>
- #include <errno.h>
- #include <sys/syscall.h>
- #include <unistd.h>
- inline int ioprio_get (int which, int who)
- {
- return syscall (__NR_ioprio_get, which, who);
- }
- ]],
- [[
- return !(ioprio_get (1, 0) != -1);
- ]])],
- [tracker_cv_have_ioprio=yes],
- [tracker_cv_have_ioprio=no],
- [AC_MSG_ERROR([cross-compiling: please set 'tracker_cv_have_ioprio'])])
-])
-
-if test "x$tracker_cv_have_ioprio" = "xyes" ; then
- AC_DEFINE(HAVE_IOPRIO, 1, [Define if we have ioprio])
-fi
-
# Binary required versions
PYTHON_REQUIRED=2.6
@@ -2192,7 +2167,6 @@ Build Configuration:
Enable functional tests: $enable_functional_tests
Enable unit tests: $have_unit_tests
- Support for ioprio: $tracker_cv_have_ioprio
Support for HAL: $have_hal
Support for UPower: $have_upower
Support for Cyrillic languages (enca): $have_enca
diff --git a/src/libtracker-common/tracker-ioprio.c b/src/libtracker-common/tracker-ioprio.c
index 3dc5ad58a..4108119af 100644
--- a/src/libtracker-common/tracker-ioprio.c
+++ b/src/libtracker-common/tracker-ioprio.c
@@ -26,7 +26,7 @@
#include "config.h"
-#ifdef HAVE_IOPRIO
+#ifdef __linux__
#include <stdio.h>
#include <errno.h>
@@ -40,14 +40,16 @@
#include <glib/gstdio.h>
-#endif /* HAVE_IOPRIO */
+#endif /* __linux__ */
#include <libtracker-common/tracker-log.h>
#include "tracker-ioprio.h"
-#ifdef HAVE_IOPRIO
+/* We assume ALL linux architectures have the syscalls defined here */
+#ifdef __linux__
+/* Make sure the system call is supported */
#ifndef __NR_ioprio_set
#if defined(__i386__)
@@ -84,7 +86,7 @@
#error "Unsupported architecture!"
#endif
-#endif
+#endif /* __NR_ioprio_set */
enum {
IOPRIO_CLASS_NONE,
@@ -140,12 +142,11 @@ tracker_ioprio_init (void)
}
}
-#else /* HAVE_IOPRIO */
-
+#else /* __linux__ */
void
tracker_ioprio_init (void)
{
}
-#endif /* HAVE_IOPRIO */
+#endif /* __linux__ */