40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
|
|
From f1c857243ce8f64e1e1d1c088e269fa294d34802 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Steve Muckle <smuckle@google.com>
|
||
|
|
Date: Tue, 31 Oct 2017 13:50:22 -0700
|
||
|
|
Subject: [PATCH 11/24] kselftest: vDSO: fix build issues
|
||
|
|
|
||
|
|
Fix a couple build issues in vdso_test.
|
||
|
|
|
||
|
|
(cherry picked from commit 460c35540cb41d20e6c9383e35321995cbd645ca)
|
||
|
|
Signed-off-by: Steve Muckle <smuckle@google.com>
|
||
|
|
---
|
||
|
|
tools/testing/selftests/vDSO/parse_vdso.c | 7 +++++--
|
||
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests/vDSO/parse_vdso.c
|
||
|
|
index 413f75620a35b..945d4e63296af 100644
|
||
|
|
--- a/tools/testing/selftests/vDSO/parse_vdso.c
|
||
|
|
+++ b/tools/testing/selftests/vDSO/parse_vdso.c
|
||
|
|
@@ -56,13 +56,16 @@ static struct vdso_info
|
||
|
|
} vdso_info;
|
||
|
|
|
||
|
|
/* Straight from the ELF specification. */
|
||
|
|
-static unsigned long elf_hash(const unsigned char *name)
|
||
|
|
+static unsigned long elf_hash(const char *s_name)
|
||
|
|
{
|
||
|
|
unsigned long h = 0, g;
|
||
|
|
+ const unsigned char *name = (const unsigned char *)s_name;
|
||
|
|
+
|
||
|
|
while (*name)
|
||
|
|
{
|
||
|
|
h = (h << 4) + *name++;
|
||
|
|
- if (g = h & 0xf0000000)
|
||
|
|
+ g = h & 0xf0000000;
|
||
|
|
+ if (g)
|
||
|
|
h ^= g >> 24;
|
||
|
|
h &= ~g;
|
||
|
|
}
|
||
|
|
--
|
||
|
|
2.36.0.550.gb090851708-goog
|
||
|
|
|