]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Add fallback for kcmp() in case __NR_kcmp is undefined 1365/head
authorMike Gilbert <floppym@gentoo.org>
Mon, 14 Sep 2015 22:55:09 +0000 (18:55 -0400)
committerMike Gilbert <floppym@gentoo.org>
Wed, 23 Sep 2015 18:41:28 +0000 (14:41 -0400)
IA64 is missing this syscall as of linux-4.2.
This works around it until the necessary kernel patch gets merged.

src/basic/missing.h

index dc1f244d4c5e0d5b4608460c8dd8768ebe9b4509..371ef8a862839f04be90455e7f64198c6b027459 100644 (file)
@@ -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