diff options
Diffstat (limited to 'meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-using-restrict-as-var-name.patch')
-rw-r--r-- | meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-using-restrict-as-var-name.patch | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-using-restrict-as-var-name.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-using-restrict-as-var-name.patch deleted file mode 100644 index b77cfe10e..000000000 --- a/meta-oe/recipes-benchmark/libhugetlbfs/files/libhugetlbfs-avoid-using-restrict-as-var-name.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | Avoid using keyword restrict as variable name which causes error with gcc 5.x: | ||
2 | |||
3 | | hugeutils.c: In function '__lh_hugetlbfs_setup_env': | ||
4 | | hugeutils.c:304:40: error: expected identifier or '(' before 'restrict' | ||
5 | | char *p, *tok, *exe, buf[MAX_EXE+1], restrict[MAX_EXE]; | ||
6 | | ^ | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
11 | --- | ||
12 | diff --git a/hugeutils.c b/hugeutils.c | ||
13 | index 53a7fbd..b9d7001 100644 | ||
14 | --- a/hugeutils.c | ||
15 | +++ b/hugeutils.c | ||
16 | @@ -301,14 +301,14 @@ void hugetlbfs_setup_env() | ||
17 | |||
18 | env = getenv("HUGETLB_RESTRICT_EXE"); | ||
19 | if (env) { | ||
20 | - char *p, *tok, *exe, buf[MAX_EXE+1], restrict[MAX_EXE]; | ||
21 | + char *p, *tok, *exe, buf[MAX_EXE+1], restricted[MAX_EXE]; | ||
22 | int found = 0; | ||
23 | |||
24 | exe = get_exe_name(buf, sizeof buf); | ||
25 | DEBUG("Found HUGETLB_RESTRICT_EXE, this exe is \"%s\"\n", exe); | ||
26 | - strncpy(restrict, env, sizeof restrict); | ||
27 | - restrict[sizeof(restrict)-1] = 0; | ||
28 | - for (p = restrict; (tok = strtok(p, ":")) != NULL; p = NULL) { | ||
29 | + strncpy(restricted, env, sizeof restricted); | ||
30 | + restricted[sizeof(restricted)-1] = 0; | ||
31 | + for (p = restricted; (tok = strtok(p, ":")) != NULL; p = NULL) { | ||
32 | DEBUG(" ...check exe match for \"%s\"\n", tok); | ||
33 | if (strcmp(tok, exe) == 0) { | ||
34 | found = 1; | ||