1From 356a6df12a0de67bdafb598dc998b3663f85cd8f Mon Sep 17 00:00:00 2001
2From: Steve Muckle <[email protected]>
3Date: Tue, 31 Oct 2017 13:50:22 -0700
4Subject: [PATCH 10/20] vDSO/parse_vdso: fix build issues
5
6Fix a couple build issues in vdso_test.
7
8(cherry picked from commit 460c35540cb41d20e6c9383e35321995cbd645ca)
9Signed-off-by: Steve Muckle <[email protected]>
10---
11 tools/testing/selftests/vDSO/parse_vdso.c | 7 +++++--
12 1 file changed, 5 insertions(+), 2 deletions(-)
13
14diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests/vDSO/parse_vdso.c
15index 413f75620a35..945d4e63296a 100644
16--- a/tools/testing/selftests/vDSO/parse_vdso.c
17+++ b/tools/testing/selftests/vDSO/parse_vdso.c
18@@ -56,13 +56,16 @@ static struct vdso_info
19 } vdso_info;
20
21 /* Straight from the ELF specification. */
22-static unsigned long elf_hash(const unsigned char *name)
23+static unsigned long elf_hash(const char *s_name)
24 {
25 	unsigned long h = 0, g;
26+	const unsigned char *name = (const unsigned char *)s_name;
27+
28 	while (*name)
29 	{
30 		h = (h << 4) + *name++;
31-		if (g = h & 0xf0000000)
32+		g = h & 0xf0000000;
33+		if (g)
34 			h ^= g >> 24;
35 		h &= ~g;
36 	}
37--
382.42.0.609.gbb76f46606-goog
39
40