diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-06-07 02:19:03 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-06-08 14:36:23 +0300 |
commit | 811e2e742e64cdc4bfb9519c0d0db53ac75aa4ce (patch) | |
tree | 5f5b7245dd94fe63cfc630b39aad6b00d8b88e37 /compr_lzo.c | |
parent | bc1040362c26828989e1a8ec2b22ebc9be20df20 (diff) |
jffs2: make lzo optional at build time
The external lzo dep can be a pain to deal with when cross-compiling,
so make it optional for jffs2. This is useful if people aren't even
using the functionality, or for quicker development.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'compr_lzo.c')
-rw-r--r-- | compr_lzo.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/compr_lzo.c b/compr_lzo.c index d0f0ed7..d2e2afc 100644 --- a/compr_lzo.c +++ b/compr_lzo.c @@ -24,6 +24,8 @@ #include <stdint.h> #include <stdio.h> #include <string.h> + +#ifndef WITHOUT_LZO #include <asm/types.h> #include <linux/jffs2.h> #include <lzo/lzo1x.h> @@ -118,3 +120,16 @@ void jffs2_lzo_exit(void) free(lzo_compress_buf); free(lzo_mem); } + +#else + +int jffs2_lzo_init(void) +{ + return 0; +} + +void jffs2_lzo_exit(void) +{ +} + +#endif |