diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-09-23 21:09:38 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-09-23 21:09:38 +0200 |
commit | 97f709186b1f18e24b3aada244047d08613523ee (patch) | |
tree | cd22f006fa0873bdb96fca55d33a3d78728574f0 /src/basic/missing.h | |
parent | 1ed11ff659f63feecad34daba93718cc7489817c (diff) | |
parent | 75b554579b4e962e2c02053129a37611a2dc9133 (diff) |
Merge pull request #1365 from floppym/kcmp
Add fallback for kcmp() in case __NR_kcmp is undefined
Diffstat (limited to 'src/basic/missing.h')
-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 93a7cb9aa0..9811b6b23e 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h @@ -1030,7 +1030,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 |