<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
From: Roland McGrath &lt;roland@redhat.com&gt;

The #include is the part of this patch that matters, so the #ifdef below
works.

The rest of the patch removes gratuitous duplication due to some strange
aversion to concision in the presence of #ifdef, the kind that is all too
common, utterly pointless, and error prone.



---

 include/linux/mm.h |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)

diff -puN include/linux/mm.h~gate_vma-fixes include/linux/mm.h
--- 25/include/linux/mm.h~gate_vma-fixes	2004-02-01 22:18:17.000000000 -0800
+++ 25-akpm/include/linux/mm.h	2004-02-01 22:18:17.000000000 -0800
@@ -12,6 +12,7 @@
 #include &lt;linux/mmzone.h&gt;
 #include &lt;linux/rbtree.h&gt;
 #include &lt;linux/fs.h&gt;
+#include &lt;linux/elf.h&gt;
 
 #ifndef CONFIG_DISCONTIGMEM          /* Don't use mapnrs, do it properly */
 extern unsigned long max_mapnr;
@@ -643,31 +644,24 @@ kernel_map_pages(struct page *page, int 
 #endif
 
 #ifndef CONFIG_ARCH_GATE_AREA
-#ifdef AT_SYSINFO_EHDR
 static inline int in_gate_area(struct task_struct *task, unsigned long addr)
 {
+#ifdef AT_SYSINFO_EHDR
 	if ((addr &gt;= FIXADDR_USER_START) &amp;&amp; (addr &lt; FIXADDR_USER_END))
 		return 1;
-	else
-		return 0;
+#endif
+	return 0;
 }
 
 extern struct vm_area_struct gate_vma;
 static inline struct vm_area_struct *get_gate_vma(struct task_struct *tsk)
 {
+#ifdef AT_SYSINFO_EHDR
 	return &amp;gate_vma;
-}
 #else
-static inline int in_gate_area(struct task_struct *task, unsigned long addr)
-{
 	return 0;
-}
-
-static inline struct vm_area_struct *get_gate_vma(struct task_struct *tsk)
-{
-	return NULL;
-}
 #endif
+}
 #endif
 
 #endif /* __KERNEL__ */

_
</pre></body></html>