diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-11-14 20:00:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-14 21:45:43 -0500 |
commit | 9c8d6381dc107dbc2bfdbfdcaefe0d42e5b5b362 (patch) | |
tree | f613029815e77425df72062ba201d62da01995ee /arch/um | |
parent | 32f862c310cbd0b430a14911c8b7e2cd415c56ea (diff) |
uml: fix build for !CONFIG_PRINTK
Handle the case of CONFIG_PRINTK being disabled. This requires a do-nothing
stub to be present in arch/um/include/user.h so that we don't get references
to printk from libc code.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/include/user.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/um/include/user.h b/arch/um/include/user.h index 99033ff28a78..1723fac6f40d 100644 --- a/arch/um/include/user.h +++ b/arch/um/include/user.h | |||
@@ -1,11 +1,13 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2000 Jeff Dike (jdike@karaya.com) | 2 | * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef __USER_H__ | 6 | #ifndef __USER_H__ |
7 | #define __USER_H__ | 7 | #define __USER_H__ |
8 | 8 | ||
9 | #include "uml-config.h" | ||
10 | |||
9 | /* | 11 | /* |
10 | * The usual definition - copied here because the kernel provides its own, | 12 | * The usual definition - copied here because the kernel provides its own, |
11 | * fancier, type-safe, definition. Using that one would require | 13 | * fancier, type-safe, definition. Using that one would require |
@@ -23,8 +25,17 @@ | |||
23 | 25 | ||
24 | extern void panic(const char *fmt, ...) | 26 | extern void panic(const char *fmt, ...) |
25 | __attribute__ ((format (printf, 1, 2))); | 27 | __attribute__ ((format (printf, 1, 2))); |
28 | |||
29 | #ifdef UML_CONFIG_PRINTK | ||
26 | extern int printk(const char *fmt, ...) | 30 | extern int printk(const char *fmt, ...) |
27 | __attribute__ ((format (printf, 1, 2))); | 31 | __attribute__ ((format (printf, 1, 2))); |
32 | #else | ||
33 | static inline int printk(const char *fmt, ...) | ||
34 | { | ||
35 | return 0; | ||
36 | } | ||
37 | #endif | ||
38 | |||
28 | extern void schedule(void); | 39 | extern void schedule(void); |
29 | extern int in_aton(char *str); | 40 | extern int in_aton(char *str); |
30 | extern int open_gdb_chan(void); | 41 | extern int open_gdb_chan(void); |