2004-11-04 17:37:28

by Tom Rini

[permalink] [raw]
Subject: [PATCH 2.6.10-rc1] Add __KERNEL__ to <linux/crc-ccitt.h>

Hello. The following adds a __KERNEL__ check to <linux/crc-ccitt.h>.
The problem is that the ppp package includes <linux/ppp_defs.h> via
<net/ppp_defs.h>, which in turn gets <linux/crc-ccitt.h>.

Signed-off-by: Tom Rini <[email protected]>

--- 1.2/include/linux/crc-ccitt.h 2004-07-11 01:54:19 -07:00
+++ edited/include/linux/crc-ccitt.h 2004-11-04 10:34:24 -07:00
@@ -1,5 +1,6 @@
#ifndef _LINUX_CRC_CCITT_H
#define _LINUX_CRC_CCITT_H
+#ifdef __KERNEL__

#include <linux/types.h>

@@ -12,4 +13,5 @@
return (crc >> 8) ^ crc_ccitt_table[(crc ^ c) & 0xff];
}

+#endif /* __KERNEL__ */
#endif /* _LINUX_CRC_CCITT_H */

--
Tom Rini
http://gate.crashing.org/~trini/


2004-11-05 01:03:12

by Paul Mackerras

[permalink] [raw]
Subject: Re: [PATCH 2.6.10-rc1] Add __KERNEL__ to <linux/crc-ccitt.h>

Tom Rini writes:

> Hello. The following adds a __KERNEL__ check to <linux/crc-ccitt.h>.
> The problem is that the ppp package includes <linux/ppp_defs.h> via
> <net/ppp_defs.h>, which in turn gets <linux/crc-ccitt.h>.

By "the ppp package" do you mean my pppd or someone else's package? I
though I had my version using a local copy of the necessary headers.

Paul.

2004-11-05 01:11:34

by Tom Rini

[permalink] [raw]
Subject: Re: [PATCH 2.6.10-rc1] Add __KERNEL__ to <linux/crc-ccitt.h>

On Fri, Nov 05, 2004 at 11:32:03AM +1100, Paul Mackerras wrote:
> Tom Rini writes:
>
> > Hello. The following adds a __KERNEL__ check to <linux/crc-ccitt.h>.
> > The problem is that the ppp package includes <linux/ppp_defs.h> via
> > <net/ppp_defs.h>, which in turn gets <linux/crc-ccitt.h>.
>
> By "the ppp package" do you mean my pppd or someone else's package? I
> though I had my version using a local copy of the necessary headers.

ppp_2.4.2+20040202.orig.tar.gz (Debian's ppp_2.4.2+20040202-3).

--
Tom Rini
http://gate.crashing.org/~trini/