Skip to content

Commit

Permalink
kvm: selftests: add -std=gnu99 cflags
Browse files Browse the repository at this point in the history
lib/kvm_util.c: In function ‘kvm_memcmp_hva_gva’:
lib/kvm_util.c:332:2: error: ‘for’ loop initial declarations are only allowed in C99 mode

So add -std=gnu99 to CFLAGS

Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Peng Hao authored and Paolo Bonzini committed Apr 12, 2018
1 parent f0f4cf5 commit 4e1acd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/kvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ LIBKVM += $(LIBKVM_$(UNAME_M))

INSTALL_HDR_PATH = $(top_srcdir)/usr
LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/
CFLAGS += -O2 -g -I$(LINUX_HDR_PATH) -Iinclude -I$(<D)
CFLAGS += -O2 -g -std=gnu99 -I$(LINUX_HDR_PATH) -Iinclude -I$(<D)

# After inclusion, $(OUTPUT) is defined and
# $(TEST_GEN_PROGS) starts with $(OUTPUT)/
Expand Down

0 comments on commit 4e1acd7

Please sign in to comment.