aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/eet
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2014-08-12 09:37:33 +0200
committerStefan Schmidt <s.schmidt@samsung.com>2014-08-22 16:27:28 +0200
commit3fe554e0b648a9f03ca150ec3b44f20f277b261c (patch)
tree91099b28f71242f57c0159fccec848de4e31ee99 /src/lib/eet
parentecore_getopt: correct fix for CID 98382 and 98383 (diff)
downloadefl-3fe554e0b648a9f03ca150ec3b44f20f277b261c.tar.gz
build: Allow to use external liblz4 instead of embedded copy
While we are likely will keep the embedded copy for a while to avoid a really new dependency we allow now to use the external liblz4. You need at least revision r120 and a package that ships the pc file for it. Personally I would like to get rid of it rather sooner than later due to the security implications and a bunch of code we ship but have no idea about. Reality is that it will need some time until this new lib is actually packaged and shipped with releases for a a majority of people. This patch was co-worked with Doug Newgard <scimmia22@outlook.com>
Diffstat (limited to 'src/lib/eet')
-rw-r--r--src/lib/eet/eet_image.c9
-rw-r--r--src/lib/eet/eet_lib.c9
2 files changed, 14 insertions, 4 deletions
diff --git a/src/lib/eet/eet_image.c b/src/lib/eet/eet_image.c
index effe990666..1530f62284 100644
--- a/src/lib/eet/eet_image.c
+++ b/src/lib/eet/eet_image.c
@@ -25,8 +25,13 @@
#include "Eet.h"
#include "Eet_private.h"
-#include "lz4.h"
-#include "lz4hc.h"
+#ifdef ENABLE_LIBLZ4
+# include <lz4.h>
+# include <lz4hc.h>
+#else
+# include "lz4.h"
+# include "lz4hc.h"
+#endif
#include "rg_etc1.h"
diff --git a/src/lib/eet/eet_lib.c b/src/lib/eet/eet_lib.c
index 40fc366459..6135b3541b 100644
--- a/src/lib/eet/eet_lib.c
+++ b/src/lib/eet/eet_lib.c
@@ -44,8 +44,13 @@ GCRY_THREAD_OPTION_PTHREAD_IMPL;
#include "Eet.h"
#include "Eet_private.h"
-#include "lz4.h"
-#include "lz4hc.h"
+#ifdef ENABLE_LIBLZ4
+# include <lz4.h>
+# include <lz4hc.h>
+#else
+# include "lz4.h"
+# include "lz4hc.h"
+#endif
#ifndef O_BINARY
# define O_BINARY 0