From: Mike Gilbert Date: Mon, 14 Sep 2015 22:55:09 +0000 (-0400) Subject: Add fallback for kcmp() in case __NR_kcmp is undefined X-Git-Tag: v227.2^2~34 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=f95cf7a0e475fcb8777c43081219320f7e3dc59b;hp=01bdc7e671164ba3126b135a475a05b6f27f985c Add fallback for kcmp() in case __NR_kcmp is undefined IA64 is missing this syscall as of linux-4.2. This works around it until the necessary kernel patch gets merged. --- diff --git a/src/basic/missing.h b/src/basic/missing.h index bc6fbc539..a073e89da 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h @@ -1026,7 +1026,12 @@ static inline int renameat2(int oldfd, const char *oldname, int newfd, const cha #if !HAVE_DECL_KCMP static inline int kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2) { +#if defined(__NR_kcmp) return syscall(__NR_kcmp, pid1, pid2, type, idx1, idx2); +#else + errno = ENOSYS; + return -1; +#endif } #endif