dect
/
linux-2.6
Archived
13
0
Fork 0

lib/decompress_*: only include <linux/slab.h> if STATIC is not defined

These includes were added by 079effb693
("kmemtrace, kbuild: fix slab.h dependency problem in
lib/decompress_inflate.c") to fix the build when using kmemtrace.  However
this is not necessary when used to create a compressed kernel, and
actually creates issues (brings a lot of things unavailable in the
decompression environment), so don't include it if STATIC is defined.

Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Cc: Phillip Lougher <phillip@lougher.demon.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Albin Tonnerre 2009-08-06 15:09:32 -07:00 committed by Linus Torvalds
parent b1af4315d8
commit 9e5cf0ca2e
3 changed files with 3 additions and 3 deletions

View File

@ -49,10 +49,10 @@
#define PREBOOT
#else
#include <linux/decompress/bunzip2.h>
#include <linux/slab.h>
#endif /* STATIC */
#include <linux/decompress/mm.h>
#include <linux/slab.h>
#ifndef INT_MAX
#define INT_MAX 0x7fffffff

View File

@ -19,11 +19,11 @@
#include "zlib_inflate/inflate.h"
#include "zlib_inflate/infutil.h"
#include <linux/slab.h>
#endif /* STATIC */
#include <linux/decompress/mm.h>
#include <linux/slab.h>
#define GZIP_IOBUF_SIZE (16*1024)

View File

@ -33,10 +33,10 @@
#define PREBOOT
#else
#include <linux/decompress/unlzma.h>
#include <linux/slab.h>
#endif /* STATIC */
#include <linux/decompress/mm.h>
#include <linux/slab.h>
#define MIN(a, b) (((a) < (b)) ? (a) : (b))