• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From 460c35540cb41d20e6c9383e35321995cbd645ca Mon Sep 17 00:00:00 2001
2From: Steve Muckle <smuckle@google.com>
3Date: Tue, 31 Oct 2017 13:50:22 -0700
4Subject: [PATCH] kselftest: vDSO: fix build issues
5
6Fix a couple build issues in vdso_test.
7
8Change-Id: Ia3f3e5b7da0632f6a23da721eb601fa5431405a3
9Signed-off-by: Steve Muckle <smuckle@google.com>
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 1dbb4b87268f..0dcbdcf5ec6b 100644
16--- a/tools/testing/selftests/vDSO/parse_vdso.c
17+++ b/tools/testing/selftests/vDSO/parse_vdso.c
18@@ -78,13 +78,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.16.0.rc1.238.g530d649a79-goog
39
40