Skip to content

Commit 2567d71

Browse files
rustyrussellIngo Molnar
authored andcommitted
x86: fix asm/e820.h for userspace inclusion
asm-x86/e820.h is included from userspace. 'x86: make e820.c to have common functions' (b79cd8f) broke it: make -C Documentation/lguest cc -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include lguest.c -lz -o lguest In file included from ../../include/asm-x86/bootparam.h:8, from lguest.c:45: ../../include/asm/e820.h:66: error: expected ‘)’ before ‘start’ ../../include/asm/e820.h:67: error: expected ‘)’ before ‘start’ ../../include/asm/e820.h:68: error: expected ‘)’ before ‘start’ ../../include/asm/e820.h:72: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘e820_update_range’ ... Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
1 parent 9354094 commit 2567d71

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎include/asm-x86/e820.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ struct e820map {
5959
struct e820entry map[E820_X_MAX];
6060
};
6161

62+
#ifdef __KERNEL__
6263
/* see comment in arch/x86/kernel/e820.c */
6364
extern struct e820map e820;
6465
extern struct e820map e820_saved;
@@ -115,7 +116,7 @@ extern void setup_memory_map(void);
115116
extern char *default_machine_specific_memory_setup(void);
116117
extern char *machine_specific_memory_setup(void);
117118
extern char *memory_setup(void);
118-
119+
#endif /* __KERNEL__ */
119120
#endif /* __ASSEMBLY__ */
120121

121122
#define ISA_START_ADDRESS 0xa0000

0 commit comments

Comments
 (0)