diff mbox series

[oe,meta-oe] libkcapi: Update patch to upstream submitted one

Message ID 20191120212556.1443911-1-raj.khem@gmail.com
State New
Headers show
Series [oe,meta-oe] libkcapi: Update patch to upstream submitted one | expand

Commit Message

Khem Raj Nov. 20, 2019, 9:25 p.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../0001-kcapi-kdf-Move-code-to-fix.patch     | 24 ++++++++++---------
 1 file changed, 13 insertions(+), 11 deletions(-)

-- 
2.24.0

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-oe/recipes-crypto/libkcapi/libkcapi/0001-kcapi-kdf-Move-code-to-fix.patch b/meta-oe/recipes-crypto/libkcapi/libkcapi/0001-kcapi-kdf-Move-code-to-fix.patch
index 3dd7ea7f9b..7ed9caf096 100644
--- a/meta-oe/recipes-crypto/libkcapi/libkcapi/0001-kcapi-kdf-Move-code-to-fix.patch
+++ b/meta-oe/recipes-crypto/libkcapi/libkcapi/0001-kcapi-kdf-Move-code-to-fix.patch
@@ -1,4 +1,4 @@ 
-From 00c1654e368f728b213c4e3782045d54098edb25 Mon Sep 17 00:00:00 2001
+From 8f961521add49278b48c9721fc53e05ee3543b74 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sat, 16 Nov 2019 23:03:51 -0800
 Subject: [PATCH] kcapi-kdf: Move code to fix
@@ -6,13 +6,14 @@  Subject: [PATCH] kcapi-kdf: Move code to fix
 Fixes clang build
 unused function '_bswap32' [-Werror,-Wunused-function]
 
+Upstream-Status: Submitted [https://github.com/smuellerDD/libkcapi/pull/83]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
- lib/kcapi-kdf.c | 36 ++++++++++++++++--------------------
- 1 file changed, 16 insertions(+), 20 deletions(-)
+ lib/kcapi-kdf.c | 37 +++++++++++++++++--------------------
+ 1 file changed, 17 insertions(+), 20 deletions(-)
 
 diff --git a/lib/kcapi-kdf.c b/lib/kcapi-kdf.c
-index ea39846..8e4a636 100644
+index ea39846..9e53a0b 100644
 --- a/lib/kcapi-kdf.c
 +++ b/lib/kcapi-kdf.c
 @@ -54,6 +54,20 @@
@@ -26,17 +27,17 @@  index ea39846..8e4a636 100644
 +# define __HAVE_BUILTIN_BSWAP32__
 +#endif
 +
-+#ifdef __HAVE_BUILTIN_BSWAP32__
-+# define be_bswap32(x) (uint32_t)__builtin_bswap32((uint32_t)(x))
 +/* Endian dependent byte swap operations.  */
-+#elif  __BYTE_ORDER__ ==  __ORDER_BIG_ENDIAN__
++#if  __BYTE_ORDER__ ==  __ORDER_BIG_ENDIAN__
 +# define be_bswap32(x) ((uint32_t)(x))
 +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
-+
++# ifdef __HAVE_BUILTIN_BSWAP32__
++#  define be_bswap32(x) (uint32_t)__builtin_bswap32((uint32_t)(x))
++# else
  static inline uint32_t rol32(uint32_t x, int n)
  {
  	return ( (x << (n&(32-1))) | (x >> ((32-n)&(32-1))) );
-@@ -68,27 +82,9 @@ static inline uint32_t _bswap32(uint32_t x)
+@@ -68,27 +82,10 @@ static inline uint32_t _bswap32(uint32_t x)
  {
  	return ((rol32(x, 8) & 0x00ff00ffL) | (ror32(x, 8) & 0xff00ff00L));
  }
@@ -59,10 +60,11 @@  index ea39846..8e4a636 100644
 -# define be_bswap32(x) ((uint32_t)(x))
 -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
 -# define be_bswap32(x) _swap32(x)
-+# define be_bswap32(x) _bswap32(x)
++#  define be_bswap32(x) _bswap32(x)
++# endif
  #else
 -#error "Endianess not defined"
-+# error "Neither builtin_bswap32 nor endianess defined"
++# error "endianess not defined"
  #endif
  
  DSO_PUBLIC