[sr-dev] git:master: core: futexlock compilation workaround for OpenSuse 10.2
Andrei Pelinescu-Onciul
andrei at iptel.org
Tue Jun 15 16:50:36 CEST 2010
Module: sip-router
Branch: master
Commit: 291166681c62ca42c05d3b501482311aa51f8d0e
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=291166681c62ca42c05d3b501482311aa51f8d0e
Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date: Mon Jun 14 19:11:59 2010 +0200
core: futexlock compilation workaround for OpenSuse 10.2
In some older linux distributions /usr/include/futex.h uses a __user
attribute, which is defined in linux/compiler.h.
However linux/compiler.h is not part of the kernel headers package in most
recent distributions. Instead they ship a modified linux/futex.h that
does not include <linux/compile.h> and does not use __user.
"__user" is used only for checking pointer address space in the kernel
(using the sparse tool and make C=1 or make C=2) so it's safe to define
it as null/empty.
Reported-by: Alexandr Dubovikov shurik start4 info
---
futexlock.h | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/futexlock.h b/futexlock.h
index df93b81..0f39d83 100644
--- a/futexlock.h
+++ b/futexlock.h
@@ -55,6 +55,16 @@
typedef __u32 u32;
struct task_struct;
/* end of the hack */
+/* another hack this time for OpenSuse 10.2:
+ futex.h uses a __user attribute, which is defined in linux/compiler.h
+ However linux/compiler.h is not part of the kernel headers package in
+ most distributions. Instead they ship a modified linux/futex.h that does
+ not include <linux/compile.h> and does not user __user.
+*/
+#ifndef __user
+#define __user
+#endif /* __user__*/
+/* end of hack */
#include <linux/futex.h>
#include <sys/syscall.h>
#include <unistd.h>
More information about the sr-dev
mailing list