aboutsummaryrefslogtreecommitdiffstats
path: root/sctp-test/0001-Fix-compilation-on-Linux.patch
blob: 7ccf3e0a9bf0e294e8f7acc66c7c06862038b2a5 (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
33
From 3ed7dcf137c7ec53077faf31aae40b3c04cbedad Mon Sep 17 00:00:00 2001
From: Harald Welte <laforge@gnumonks.org>
Date: Wed, 3 May 2017 22:13:54 +0200
Subject: [PATCH] Fix compilation on Linux

DEBUG_LOGGING is a #define, we have to use the preprocessor to check for
it.
---
 gtests/net/packetdrill/packet_socket_linux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gtests/net/packetdrill/packet_socket_linux.c b/gtests/net/packetdrill/packet_socket_linux.c
index 8abf106..572b5b8 100644
--- a/gtests/net/packetdrill/packet_socket_linux.c
+++ b/gtests/net/packetdrill/packet_socket_linux.c
@@ -175,12 +175,12 @@ void packet_socket_set_filter(struct packet_socket *psock,
 	bpfcode.filter[3].k = ((client_ether[0] << 8)  |
 			       (client_ether[1]));
 
-	if (DEBUG_LOGGING) {
+#ifdef DEBUG_LOGGING
 		int i;
 		DEBUGP("filter constants:\n");
 		for (i = 0; i < bpfcode.len; ++i)
 			DEBUGP("0x%x\n", bpfcode.filter[i].k);
-	}
+#endif
 
 	/* Attach the filter. */
 	if (setsockopt(psock->packet_fd, SOL_SOCKET, SO_ATTACH_FILTER,
-- 
2.11.0