Skip to content

Commit 4a490e6

Browse files
committed
msgget05: Fix build on centos 6
Which has old gcc that does not allow variables decleared inside of the for loop. Signed-off-by: Cyril Hrubis <[email protected]>
1 parent b2d61f7 commit 4a490e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

testcases/kernel/syscalls/ipc/msgget/msgget05.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ static void setup(void)
5151

5252
static void cleanup(void)
5353
{
54-
for (int i = 0; i < 2; i++) {
54+
int i;
55+
56+
for (i = 0; i < 2; i++) {
5557
if (queue_id[i] != -1)
5658
SAFE_MSGCTL(queue_id[i], IPC_RMID, NULL);
5759
}

0 commit comments

Comments
 (0)