summaryrefslogtreecommitdiffstats
path: root/tools/build/feature/test-lzma.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2015-03-04 11:35:47 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-03-21 14:53:39 -0300
commit6c6f0f6164fbf7a1667378496ee36ae48c18a9d6 (patch)
treef7cbfd5ceaa05b16fbfd3e0db2392b447e62c579 /tools/build/feature/test-lzma.c
parent00ae1127a03d20f5ef89f3c1fe7d4720270fc2a5 (diff)
downloadlinux-6c6f0f6164fbf7a1667378496ee36ae48c18a9d6.tar.bz2
tools build: Add feature check for lzma library
Will be used to decompress 'xz' objects. The check detects the liblzma.so devel library normally delivered by xz package. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com>
Diffstat (limited to 'tools/build/feature/test-lzma.c')
-rw-r--r--tools/build/feature/test-lzma.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/build/feature/test-lzma.c b/tools/build/feature/test-lzma.c
new file mode 100644
index 000000000000..95adc8ced3dd
--- /dev/null
+++ b/tools/build/feature/test-lzma.c
@@ -0,0 +1,10 @@
+#include <lzma.h>
+
+int main(void)
+{
+ lzma_stream strm = LZMA_STREAM_INIT;
+ int ret;
+
+ ret = lzma_stream_decoder(&strm, UINT64_MAX, LZMA_CONCATENATED);
+ return ret ? -1 : 0;
+}