[PATCH] Include header required for INT_MAX

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <axboe@...>
Cc: <linux-kernel@...>
Date: Saturday, November 10, 2007 - 10:55 am

cdrom.h uses INT_MAX, so it must include kernel.h or
limits.h (userspace) for a definition.

Signed-off-by: Thomas Koeller <thomas@koeller.dyndns.org>

diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h
index c6d3e22..bd8064a 100644
--- a/include/linux/cdrom.h
+++ b/include/linux/cdrom.h
@@ -12,6 +12,11 @@
 #define	_LINUX_CDROM_H
 
 #include <asm/byteorder.h>
+#ifdef __KERNEL__
+#include <linux/kernel.h>
+#else
+#include <limits.h>
+#endif
 
 /*******************************************************
  * As of Linux 2.1.x, all Linux CD-ROM application programs will use this 
-- 
1.5.3.4

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Include header required for INT_MAX, Thomas Koeller, (Sat Nov 10, 10:55 am)
Re: [PATCH] Include header required for INT_MAX, Alexander E. Patrakov, (Sat Nov 10, 12:48 pm)
Re: [PATCH] Include header required for INT_MAX, Christoph Hellwig, (Sat Nov 10, 11:56 am)
Re: [PATCH] Include header required for INT_MAX, Thomas Koeller, (Sat Nov 10, 8:52 pm)