[PATCH v1] samples: fix compilatin of mpssd

From: Constantine Shulyupin
Date: Sat Jul 07 2018 - 16:00:42 EST


Errors:

In file included from /usr/include/x86_64-linux-gnu/sys/types.h:194:0,
from /usr/include/stdlib.h:394,
from mpssd.c:23:
mpssd.c:93:10: error: initializer element is not constant
.num = htole16(MIC_VRING_ENTRIES),

mpssd.c:610:10: warning: implicit declaration of function âreadvâ;

Signed-off-by: Constantine Shulyupin <const@xxxxxxxxxxxxx>
---
samples/mic/mpssd/mpssd.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/samples/mic/mpssd/mpssd.c b/samples/mic/mpssd/mpssd.c
index f42ce551bb48..9cddb9cfdc79 100644
--- a/samples/mic/mpssd/mpssd.c
+++ b/samples/mic/mpssd/mpssd.c
@@ -33,6 +33,7 @@
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/socket.h>
+#include <sys/uio.h>
#include <linux/virtio_ring.h>
#include <linux/virtio_net.h>
#include <linux/virtio_console.h>
@@ -77,6 +78,10 @@ static struct mic_info mic_list;
#define VIRTIO_NET_HDR_F_DATA_VALID 2 /* Csum is valid */
#endif

+#define __uint16_identity(x) (x)
+#define __uint64_identity(x) (x)
+#define __uint32_identity(x) (x)
+
static struct {
struct mic_device_desc dd;
struct mic_vqconfig vqconfig[2];
--
2.17.1