diff options
author | Mike Gilbert <floppym@gentoo.org> | 2015-09-14 18:55:09 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2015-09-23 14:41:28 -0400 |
commit | 75b554579b4e962e2c02053129a37611a2dc9133 (patch) | |
tree | b29afa377afccee17f9df15cdb75f1bb3856c1e3 /src/basic | |
parent | d80157747393a545b33f462e511a1629844d4d61 (diff) |
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.
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/missing.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/basic/missing.h b/src/basic/missing.h index dc1f244d4c..371ef8a862 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h @@ -1028,7 +1028,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 |