Re: Small include fix

From: Andrew Morton (andrewm@uow.edu.au)
Date: Sat Apr 01 2000 - 19:18:25 EST


Jan Kara wrote:
>
> Hello.
>
> I'm sending a small fix in linux/fs.h. I made linux/string.h include in #ifdef __KERNEL__ -
> when it was out of it it made problems when fs.h was included from user program.

Last time this issue was discussed the consensus was that the ifdef
should go into string.h itself, so it covers cases other than fs.h.

The string.h fix is required by hdparm and e2fstools, amongst others.

--- linux-2.3.99-pre4-1/include/linux/string.h Thu Feb 17 07:54:50 2000
+++ linux.akpm/include/linux/string.h Sun Apr 2 10:14:29 2000
@@ -1,6 +1,8 @@
 #ifndef _LINUX_STRING_H_
 #define _LINUX_STRING_H_

+#ifdef __KERNEL__
+
 #include <linux/types.h> /* for size_t */
 #include <linux/stddef.h> /* for NULL */

@@ -39,6 +41,8 @@

 #ifdef __cplusplus
 }
+#endif
+
 #endif

 #endif /* _LINUX_STRING_H_ */

-- 
-akpm-

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



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:08 EST