From 885812649a9c409ac93c8b07b23738580069a7a7 Mon Sep 17 00:00:00 2001
From: Michael Tuexen <tuexen@fh-muenster.de>
Date: Wed, 28 Oct 2015 09:28:25 +0100
Subject: [PATCH] Fix compilation on Linux.

Linux does not support pdapi_stream and pdapi_seq.
---
 gtests/net/packetdrill/run_system_call.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gtests/net/packetdrill/run_system_call.c b/gtests/net/packetdrill/run_system_call.c
index 7a0a6613..3fb94854 100644
--- a/gtests/net/packetdrill/run_system_call.c
+++ b/gtests/net/packetdrill/run_system_call.c
@@ -3513,12 +3513,26 @@ static int check_sctp_pdapi_event(struct sctp_pdapi_event_expr *expr,
 	if (check_u32_expr(expr->pdapi_indication, sctp_event->pdapi_indication,
 			   "sctp_pdapi_event.pdapi_indication", error))
 		return STATUS_ERR;
+#if defined(linux)
+	if (expr->pdapi_stream->type != EXPR_ELLIPSIS) {
+		asprintf(error, "Linux doesn't support sctp_pdapi_event.pdapi_stream");
+		return STATUS_ERR;
+	}
+#else
 	if (check_u32_expr(expr->pdapi_stream, sctp_event->pdapi_stream,
 			   "sctp_pdapi_event.pdapi_stream", error))
 		return STATUS_ERR;
+#endif
+#if defined(linux)
+	if (expr->pdapi_seq->type != EXPR_ELLIPSIS) {
+		asprintf(error, "Linux doesn't support sctp_pdapi_event.pdapi_seq");
+		return STATUS_ERR;
+	}
+#else
 	if (check_u32_expr(expr->pdapi_seq, sctp_event->pdapi_seq,
 			   "sctp_pdapi_event.pdapi_seq", error))
 		return STATUS_ERR;
+#endif
 	if (check_u32_expr(expr->pdapi_assoc_id, sctp_event->pdapi_assoc_id,
 			   "sctp_pdapi_event.pdapi_assoc_id", error))
 		return STATUS_ERR;
-- 
GitLab