summaryrefslogtreecommitdiff
path: root/usr.bin/nc
diff options
context:
space:
mode:
authorVincent Labrecque <vincent@cvs.openbsd.org>2002-07-01 20:12:41 +0000
committerVincent Labrecque <vincent@cvs.openbsd.org>2002-07-01 20:12:41 +0000
commit8c65bdc2f2da176e338c644708eff2d236846cfb (patch)
tree0492ded8e0ecaf445f089def03cf656a51414659 /usr.bin/nc
parente82c64878f7ae3658958175b28e121ae6443f42a (diff)
define SUN_LEN if it is not already for portability.
millert made the same suggestion, so i guess it's ok ;)
Diffstat (limited to 'usr.bin/nc')
-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 */