summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch')
-rw-r--r--meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch40
1 files changed, 0 insertions, 40 deletions
diff --git a/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch b/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch
deleted file mode 100644
index 0ec20fad99..0000000000
--- a/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From 38d6871d9c98e0080426ea375e390728485b2bc2 Mon Sep 17 00:00:00 2001
2From: Ting Liu <b28495@freescale.com>
3Date: Tue, 10 Sep 2013 06:00:20 +0000
4Subject: [PATCH] Change to calling bswap_* instead of htobe* and be*toh
5
6We can't use htobe* and be*toh functions because they are not
7available on older versions of glibc, For example, shipped on Centos 5.5.
8
9Change to directly calling bswap_* as defined in+byteswap.h.
10
11Upstream-Status: Inappropriate
12
13Signed-off-by: Ting Liu <b28495@freescale.com>
14Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
15
16---
17 libkmod/libkmod-signature.c | 3 ++-
18 1 file changed, 2 insertions(+), 1 deletion(-)
19
20diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c
21index 48d0145..dd2c6fa 100644
22--- a/libkmod/libkmod-signature.c
23+++ b/libkmod/libkmod-signature.c
24@@ -18,6 +18,7 @@
25 */
26
27 #include <endian.h>
28+#include <byteswap.h>
29 #include <inttypes.h>
30 #ifdef ENABLE_OPENSSL
31 #include <openssl/cms.h>
32@@ -343,7 +344,7 @@ bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signat
33 modsig->hash >= PKEY_HASH__LAST ||
34 modsig->id_type >= PKEY_ID_TYPE__LAST)
35 return false;
36- sig_len = be32toh(get_unaligned(&modsig->sig_len));
37+ sig_len = bswap_32(get_unaligned(&modsig->sig_len));
38 if (sig_len == 0 ||
39 size < (int64_t)(modsig->signer_len + modsig->key_id_len + sig_len))
40 return false;