aboutsummaryrefslogtreecommitdiffstats
path: root/debian/patches/ubuntu-fix-xenvirt-support-dynamic-page-size.patch
blob: ed6fb5d03f31712d0fcdee27d912c0ae66c89c37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Author: Ricardo Salveti <ricardo.salveti@linaro.org>
Last-Update: 2016-04-17
Fowarded: yes
Description: xenvirt: support dynamic page size

Fix build failure since PAGE_SIZE is not defined on ARM (multiple values
are possible, so it needs to dynamically get the page size used).

http://dpdk.org/ml/archives/dev/2016-April/037586.html

Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
---
 drivers/net/xenvirt/rte_eth_xenvirt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/xenvirt/rte_eth_xenvirt.c b/drivers/net/xenvirt/rte_eth_xenvirt.c
index b9638d9..afc0193 100644
--- a/drivers/net/xenvirt/rte_eth_xenvirt.c
+++ b/drivers/net/xenvirt/rte_eth_xenvirt.c
@@ -39,6 +39,9 @@
 #include <sys/mman.h>
 #include <errno.h>
 #include <sys/user.h>
+#ifndef PAGE_SIZE
+#define PAGE_SIZE sysconf(_SC_PAGE_SIZE)
+#endif
 #include <linux/binfmts.h>
 #include <xen/xen-compat.h>
 #if __XEN_LATEST_INTERFACE_VERSION__ < 0x00040200
-- 
2.7.4