Index: configure.in =================================================================== RCS file: /cvs/gnome/tracker/configure.in,v retrieving revision 1.28 diff -u -7 -r1.28 configure.in --- configure.in 19 Oct 2006 01:30:17 -0000 1.28 +++ configure.in 20 Oct 2006 20:20:23 -0000 @@ -435,21 +435,22 @@ #################################################################### AC_MSG_CHECKING([[checking ioprio support]]) ioprio_support=no AC_RUN_IFELSE([ AC_LANG_PROGRAM([[ #include #include -#include - ]], [[ -_syscall2(int, ioprio_get, int, which, int, who); -int main() +#include +#include +inline int ioprio_get (int which, int who) { - exit(ioprio_get(1,0)); + return syscall (__NR_ioprio_get, which, who); } + ]], [[ +exit(ioprio_get(1,0)); ]]) ], [ AC_DEFINE(IOPRIO_SUPPORT,[],[Define ioprio support]) ioprio_support=yes ]) AC_MSG_RESULT([$ioprio_support]) ##################################################### AM_CONFIG_HEADER(src/trackerd/config.h) Index: src/trackerd/tracker-ioprio.c =================================================================== RCS file: /cvs/gnome/tracker/src/trackerd/tracker-ioprio.c,v retrieving revision 1.2 diff -u -7 -r1.2 tracker-ioprio.c --- src/trackerd/tracker-ioprio.c 11 Oct 2006 23:30:55 -0000 1.2 +++ src/trackerd/tracker-ioprio.c 20 Oct 2006 20:20:23 -0000 @@ -18,14 +18,15 @@ * Boston, MA 02111-1307, USA. */ #include #include #include #include +#include #ifdef HAVE_LINUX_UNISTD_H #include #endif #include "tracker-ioprio.h" #ifdef IOPRIO_SUPPORT @@ -40,16 +41,23 @@ IOPRIO_WHO_PROCESS = 1, IOPRIO_WHO_PGRP, IOPRIO_WHO_USER, }; #define IOPRIO_CLASS_SHIFT 13 -_syscall2(int, ioprio_get, int, which, int, who); -_syscall3(int, ioprio_set, int, which, int, who, int, ioprio); +static inline int ioprio_set (int which, int who, int ioprio) +{ + return syscall (__NR_ioprio_set, which, who, ioprio); +} + +static inline int ioprio_get (int which, int who) +{ + return syscall (__NR_ioprio_get, which, who); +} void ioprio() { int ioprio = 7, ioprio_class = IOPRIO_CLASS_BE; tracker_log ("Setting ioprio best effort."); if (ioprio_set(IOPRIO_WHO_PROCESS,0,ioprio | ioprio_class << IOPRIO_CLASS_SHIFT) == -1) {