lkml.org 
[lkml]   [2005]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] asm-i386 : config.h should not be included out of kernel
Hi,

It seems that in include/asm-i386/param.h the "#include
<linux/config.h>" should be inside the #ifdef __KERNEL__, as it is done
in asm-ia64.

Some applications cannot compile/work correctly whithout this patch. For
example busybox defines for itself CONFIG_TR (related to the tr
program), which is unfortunately undefined when including sys/param.h,
which includes linux/config.h (CONFIG_TR is the config for token ring).

Can you consider the following patch ?

Thanks,
Olivier
--- linux-2.6.14.3.orig/include/asm-i386/param.h 2005-12-06 14:13:15.000000000 +0100
+++ linux-2.6.14.3/include/asm-i386/param.h 2005-12-06 13:51:12.000000000 +0100
@@ -1,9 +1,9 @@
-#include <linux/config.h>
-
#ifndef _ASMi386_PARAM_H
#define _ASMi386_PARAM_H

#ifdef __KERNEL__
+#include <linux/config.h> /* mustn't include <linux/config.h> outside of #ifdef __KERNEL__ */
+
# define HZ CONFIG_HZ /* Internal kernel timer frequency */
# define USER_HZ 100 /* .. some user interfaces are in "ticks" */
# define CLOCKS_PER_SEC (USER_HZ) /* like times() */
\
 
 \ /
  Last update: 2005-12-06 21:30    [W:0.134 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site