File libhugetlbfs-2.18-restrict-is-a-reserved-word.patch of Package libhugetlbfs

diff -up libhugetlbfs-2.18/hugeutils.c.orig libhugetlbfs-2.18/hugeutils.c
--- libhugetlbfs-2.18/hugeutils.c.orig	2015-06-24 00:23:09.374535669 +0200
+++ libhugetlbfs-2.18/hugeutils.c	2015-06-24 00:23:45.536534148 +0200
@@ -301,14 +301,14 @@ void hugetlbfs_setup_env()
 
 	env = getenv("HUGETLB_RESTRICT_EXE");
 	if (env) {
-		char *p, *tok, *exe, buf[MAX_EXE+1], restrict[MAX_EXE];
+		char *p, *tok, *exe, buf[MAX_EXE+1], restriction[MAX_EXE];
 		int found = 0;
 
 		exe = get_exe_name(buf, sizeof buf);
 		DEBUG("Found HUGETLB_RESTRICT_EXE, this exe is \"%s\"\n", exe);
-		strncpy(restrict, env, sizeof restrict);
-		restrict[sizeof(restrict)-1] = 0;
-		for (p = restrict; (tok = strtok(p, ":")) != NULL; p = NULL) {
+		strncpy(restriction, env, sizeof restriction);
+		restriction[sizeof(restriction)-1] = 0;
+		for (p = restriction; (tok = strtok(p, ":")) != NULL; p = NULL) {
 			DEBUG("  ...check exe match for \"%s\"\n",  tok);
 			if (strcmp(tok, exe) == 0) {
 				found = 1;
openSUSE Build Service is sponsored by