summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorChristoph Gysin <christoph.gysin@gmail.com>2015-09-29 09:53:01 +0300
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-10-22 17:50:51 +0200
commit7499ef45c375998a67c65b7eac0d9d4639ac5ac4 (patch)
tree000671b7a0d516e298a0caa1859307f0660fd031 /app
parentd08d304508a8a8caf255baf622ab65db1fec952c (diff)
downloaddpdk-7499ef45c375998a67c65b7eac0d9d4639ac5ac4.zip
dpdk-7499ef45c375998a67c65b7eac0d9d4639ac5ac4.tar.gz
dpdk-7499ef45c375998a67c65b7eac0d9d4639ac5ac4.tar.xz
eal: fix C++ build
'virtual' is a keyword and can't be used if the code is to compile with C++ compilers. If rte_devargs.h was included in C++ code, compilation with clang++ failed with an error. g++ did not fail, but only because of a bug that treats it as an anonymous struct with a decl-specifier which it ignores. This simply renames the member to 'virt'. Reported-by: Ming Zhao <mzhao@luminatewireless.com> Signed-off-by: Christoph Gysin <christoph.gysin@gmail.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Acked-by: David Marchand <david.marchand@6wind.com>
Diffstat (limited to 'app')
-rw-r--r--app/test/test_devargs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c
index f7fc59c..049f32d 100644
--- a/app/test/test_devargs.c
+++ b/app/test/test_devargs.c
@@ -91,8 +91,8 @@ test_devargs(void)
if (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, "eth_ring1,k1=val,k2=val2") < 0)
goto fail;
devargs = TAILQ_FIRST(&devargs_list);
- if (strncmp(devargs->virtual.drv_name, "eth_ring1",
- sizeof(devargs->virtual.drv_name)) != 0)
+ if (strncmp(devargs->virt.drv_name, "eth_ring1",
+ sizeof(devargs->virt.drv_name)) != 0)
goto fail;
if (!devargs->args || strcmp(devargs->args, "k1=val,k2=val2") != 0)
goto fail;