mkfs.ubifs: fix build without openssl
diff mbox series

Message ID 451b6fd8f6b619ae75d283df02edd835c8e3c627.1553855544.git.baruch@tkos.co.il
State New
Delegated to: David Oberhollenzer
Headers show
Series
  • mkfs.ubifs: fix build without openssl
Related show

Commit Message

Baruch Siach March 29, 2019, 10:32 a.m. UTC
Exclude openssl headers when WITH_CRYPTO is not defined.

Fixes this build failure:

In file included from ubifs-utils/mkfs.ubifs/mkfs.ubifs.c:25:0:
ubifs-utils/mkfs.ubifs/mkfs.ubifs.h:49:10: fatal error: openssl/rand.h: No such file or directory
 #include <openssl/rand.h>
          ^~~~~~~~~~~~~~~~

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 ubifs-utils/mkfs.ubifs/mkfs.ubifs.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

David Oberhollenzer March 29, 2019, 11:54 a.m. UTC | #1
Applied to mtd-utils.git master.

Thanks,

David

Patch
diff mbox series

diff --git a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.h b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.h
index aa032392155b..8f0186043079 100644
--- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.h
+++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.h
@@ -46,7 +46,9 @@ 
 #include <uuid.h>
 #include <sys/file.h>
 
+#ifdef WITH_CRYPTO
 #include <openssl/rand.h>
+#endif
 
 #include <mtd/ubifs-media.h>