summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvincent <vincent@openbsd.org>2002-07-01 20:12:40 +0000
committervincent <vincent@openbsd.org>2002-07-01 20:12:40 +0000
commit18a78193092a480b7b2bd624e8e4abfb4147bc81 (patch)
treed09a6d2e86104675b584df592ed6d1c259f47713
parentfor compression=yes, we fallback to no-compression if the server does (diff)
downloadwireguard-openbsd-18a78193092a480b7b2bd624e8e4abfb4147bc81.tar.xz
wireguard-openbsd-18a78193092a480b7b2bd624e8e4abfb4147bc81.zip
define SUN_LEN if it is not already for portability.
millert made the same suggestion, so i guess it's ok ;)
-rw-r--r--usr.bin/nc/netcat.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
index c0eb685d02c..c5df3722101 100644
--- a/usr.bin/nc/netcat.c
+++ b/usr.bin/nc/netcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcat.c,v 1.50 2002/07/01 15:40:40 vincent Exp $ */
+/* $OpenBSD: netcat.c,v 1.51 2002/07/01 20:12:40 vincent Exp $ */
/*
* Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
*
@@ -50,6 +50,11 @@
#include <unistd.h>
#include <fcntl.h>
+#ifndef SUN_LEN
+#define SUN_LEN(su) \
+ (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
+#endif
+
#define PORT_MAX 65535
/* Command Line Options */