svn commit: r320616 - head/contrib/libpcap/bpf/net
Sean Bruno
sbruno at FreeBSD.org
Mon Jul 3 19:49:27 UTC 2017
Author: sbruno
Date: Mon Jul 3 19:49:25 2017
New Revision: 320616
URL: https://svnweb.freebsd.org/changeset/base/320616
Log:
Clear clang warning:
warning: macro expansion producing 'defined' has undefined behavior
[-Wexpansion-to-defined]
Submitted by: Aaron Prieger <aprieger at llnw.com>
Reviewed by: dim
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D11166
Modified:
head/contrib/libpcap/bpf/net/bpf_filter.c
Modified: head/contrib/libpcap/bpf/net/bpf_filter.c
==============================================================================
--- head/contrib/libpcap/bpf/net/bpf_filter.c Mon Jul 3 19:46:12 2017 (r320615)
+++ head/contrib/libpcap/bpf/net/bpf_filter.c Mon Jul 3 19:49:25 2017 (r320616)
@@ -61,7 +61,12 @@
#include <sys/types.h>
#include <sys/time.h>
-#define SOLARIS (defined(sun) && (defined(__SVR4) || defined(__svr4__)))
+#if (defined(sun) && (defined(__SVR4) || defined(__svr4__)))
+#define SOLARIS 1
+#else
+#define SOLARIS 0
+#endif
+
#if defined(__hpux) || SOLARIS
# include <sys/sysmacros.h>
# include <sys/stream.h>
More information about the svn-src-head
mailing list