aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorFan Du <fan.du@windriver.com>2014-01-10 01:39:13 -0500
committerSteffen Klassert <steffen.klassert@secunet.com>2014-01-10 01:46:24 -0500
commit6bae919003602729d6f5920315bf71ca78bd9e48 (patch)
tree4c3dee0803d9f7b004580c3fee34e4a791153147 /net/core
parent5537a0557c26b1005a8f6e59125bfe3f4e51226a (diff)
{xfrm,pktgen} Fix compiling error when CONFIG_XFRM is not set
0-DAY kernel build testing backend reported below error: All error/warnings: net/core/pktgen.c: In function 'pktgen_if_write': >> >> net/core/pktgen.c:1487:10: error: 'struct pktgen_dev' has no member named 'spi' >> >> net/core/pktgen.c:1488:43: error: 'struct pktgen_dev' has no member named 'spi' Fix this by encapuslating the code with CONFIG_XFRM. Cc: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Fan Du <fan.du@windriver.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/pktgen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index a37ec53c554c..fa3e128eb5e9 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -1482,7 +1482,7 @@ static ssize_t pktgen_if_write(struct file *file,
1482 sprintf(pg_result, "OK: flows=%u", pkt_dev->cflows); 1482 sprintf(pg_result, "OK: flows=%u", pkt_dev->cflows);
1483 return count; 1483 return count;
1484 } 1484 }
1485 1485#ifdef CONFIG_XFRM
1486 if (!strcmp(name, "spi")) { 1486 if (!strcmp(name, "spi")) {
1487 len = num_arg(&user_buffer[i], 10, &value); 1487 len = num_arg(&user_buffer[i], 10, &value);
1488 if (len < 0) 1488 if (len < 0)
@@ -1493,7 +1493,7 @@ static ssize_t pktgen_if_write(struct file *file,
1493 sprintf(pg_result, "OK: spi=%u", pkt_dev->spi); 1493 sprintf(pg_result, "OK: spi=%u", pkt_dev->spi);
1494 return count; 1494 return count;
1495 } 1495 }
1496 1496#endif
1497 if (!strcmp(name, "flowlen")) { 1497 if (!strcmp(name, "flowlen")) {
1498 len = num_arg(&user_buffer[i], 10, &value); 1498 len = num_arg(&user_buffer[i], 10, &value);
1499 if (len < 0) 1499 if (len < 0)