Skip to content

Commit

Permalink
{xfrm,pktgen} Fix compiling error when CONFIG_XFRM is not set
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fan Du authored and Steffen Klassert committed Jan 10, 2014
1 parent 5537a05 commit 6bae919
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,7 @@ static ssize_t pktgen_if_write(struct file *file,
sprintf(pg_result, "OK: flows=%u", pkt_dev->cflows);
return count;
}

#ifdef CONFIG_XFRM
if (!strcmp(name, "spi")) {
len = num_arg(&user_buffer[i], 10, &value);
if (len < 0)
Expand All @@ -1493,7 +1493,7 @@ static ssize_t pktgen_if_write(struct file *file,
sprintf(pg_result, "OK: spi=%u", pkt_dev->spi);
return count;
}

#endif
if (!strcmp(name, "flowlen")) {
len = num_arg(&user_buffer[i], 10, &value);
if (len < 0)
Expand Down

0 comments on commit 6bae919

Please sign in to comment.