lkml.org 
[lkml]   [2000]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject[patch-2.4.0-test7-pre6] bugfix in <linux/fs.h>
Hi Linus,

The <linux/fs.h> contains BLKRRPART ioctl cmds so it can be legitimately
included by user application. However, if such also includes <string.h>
and specifies -O option then it will fail to compile because of
<linux/string.h>.

I think I sent you a fix for this many moons ago but it somehow got
lost. Anyway, here it is again.

Regards,
Tigran

--- linux/include/linux/fs.h Tue Aug 22 08:22:17 2000
+++ work/include/linux/fs.h Tue Aug 22 13:53:26 2000
@@ -20,7 +20,10 @@
#include <linux/stat.h>
#include <linux/cache.h>
#include <linux/stddef.h>
+
+#ifdef __KERNEL__
#include <linux/string.h>
+#endif

#include <asm/atomic.h>
#include <asm/bitops.h>
Alternatively, I know that you don't like seeing __KERNEL__ so we can hide
it inside <linux/string.h> - both patches tested under test7-pre6

--- linux/include/linux/string.h Sat May 13 09:32:41 2000
+++ work/include/linux/string.h Tue Aug 22 13:59:51 2000
@@ -1,6 +1,8 @@
#ifndef _LINUX_STRING_H_
#define _LINUX_STRING_H_

+#ifdef __KERNEL__ /* userspace has no business here */
+
#include <linux/types.h> /* for size_t */
#include <linux/stddef.h> /* for NULL */

@@ -79,5 +81,7 @@
#ifdef __cplusplus
}
#endif
+
+#endif /* __KERNEL__ */

#endif /* _LINUX_STRING_H_ */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:37    [W:0.022 / U:2.640 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site