docker-playground/sctp-test/0001-Fix-compilation-on-Lin...

34 lines
1.0 KiB
Diff

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