On Mon, Dec 17, 2007 at 11:47:37PM +0000, Samuel Thibault wrote: > On non-linux systems, the ioprio check correctly gets a program build > failure: > conftest.c:56: error: 'SYS_ioprio_get' undeclared (first use in this function) > but the util_cv_syscall_ioprio_get still gets assigned 290 on i386 for > instance, seemingly because the fallback is always used as last resort. Nice, it seems the fallback really works ;-) On non-linux systems we can simply disable the fallback (see a patch below) or we needn't all UTIL_CHECK_SYSCALL code, because checking for linux syscalls on non-linux systems is too optimistic... Karel >From a90ac948b4e97197116da3010e4439633806ad3f Mon Sep 17 00:00:00 2001 From: Karel Zak <kzak@xxxxxxxxxx> Date: Tue, 18 Dec 2007 01:53:10 +0100 Subject: [PATCH] build-sys: disable syscall fallbacks for non-linux systems Signed-off-by: Karel Zak <kzak@xxxxxxxxxx> --- configure.ac | 24 +++++++++++++----------- 1 files changed, 13 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index ca1c525..66bfa51 100644 --- a/configure.ac +++ b/configure.ac @@ -27,6 +27,14 @@ esac AC_PROG_CC_STDC AC_GNU_SOURCE +linux_os=no +case ${host_os} in + *linux*) + linux_os=yes + ;; +esac +AM_CONDITIONAL([LINUX], test x$linux_os = xyes) + AC_PATH_PROG(PERL, perl) AC_PATH_PROG(BLKID, blkid, [], [$PATH:/sbin]) AC_PATH_PROG(VOLID, vol_id, [], [$PATH:/lib/udev]) @@ -208,9 +216,11 @@ AC_DEFUN([UTIL_CHECK_SYSCALL], [ [syscall=_NR_$1], [ syscall=no - case $host_cpu in - _UTIL_CHECK_SYSCALL_FALLBACK(m4_shift($@)) - esac + if test $linux_os = yes; then + case $host_cpu in + _UTIL_CHECK_SYSCALL_FALLBACK(m4_shift($@)) + esac + fi ]) ]) util_cv_syscall_$1=$syscall @@ -294,14 +304,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [AC_MSG_NOTICE([Your libc thinks that swapon has 1 arg only.]) ]) -case ${host_os} in - *linux*) - AM_CONDITIONAL([LINUX], [true]) - ;; - *) - AM_CONDITIONAL([LINUX], [false]) - ;; -esac dnl UTIL_SET_ARCH(ARCHNAME, PATTERN) dnl --------------------------------- -- 1.5.3.1 - To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html