From f54f5bac9e9b0127052a23aaa7c9cfc4170b1f00 Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Tue, 9 Jul 2013 15:38:03 +0800 Subject: Refs #248. Fixed the LSB compatiable issue for BLAS only. For example, make CC=lsbcc NO_LAPACK=1. --- common_linux.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'common_linux.h') diff --git a/common_linux.h b/common_linux.h index 6766ff37c..afc77b4a2 100644 --- a/common_linux.h +++ b/common_linux.h @@ -65,9 +65,16 @@ extern long int syscall (long int __sysno, ...); #endif #endif + + static inline int my_mbind(void *addr, unsigned long len, int mode, unsigned long *nodemask, unsigned long maxnode, unsigned flags) { +#if defined (__LSB_VERSION__) +// So far, LSB (Linux Standard Base) don't support syscall(). +// https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=3482 + return 0; +#else #if defined (LOONGSON3B) #if defined (__64BIT__) return syscall(SYS_mbind, addr, len, mode, nodemask, maxnode, flags); @@ -79,11 +86,17 @@ static inline int my_mbind(void *addr, unsigned long len, int mode, // unsigned long null_nodemask=0; return syscall(SYS_mbind, addr, len, mode, nodemask, maxnode, flags); #endif +#endif } static inline int my_set_mempolicy(int mode, const unsigned long *addr, unsigned long flag) { - +#if defined (__LSB_VERSION__) +// So far, LSB (Linux Standard Base) don't support syscall(). +// https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=3482 + return 0; +#else return syscall(SYS_set_mempolicy, mode, addr, flag); +#endif } static inline int my_gettid(void) { -- cgit v1.2.3