2003-06-04 15:09:43

by Dmitry A. Fedorov

[permalink] [raw]
Subject: [PATCH] get_current_user() macro in linux/sched.h conflicts with __user defined in compiler.h


get_current_user() macro in linux/sched.h conflicts with the
user space attribute #define __user from compiler.h.

I have not found any usage of this macro in all kernel code though.

--- linux-2.5.70/include/linux/sched.h.orig Tue May 27 08:00:23 2003
+++ linux-2.5.70/include/linux/sched.h Wed Jun 4 21:58:00 2003
@@ -289,9 +289,9 @@
};

#define get_current_user() ({ \
- struct user_struct *__user = current->user; \
- atomic_inc(&__user->__count); \
- __user; })
+ struct user_struct *_user_ = current->user; \
+ atomic_inc(&_user_->__count); \
+ _user_; })

extern struct user_struct *find_user(uid_t);