aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/bluetooth/sdpd/sar.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bluetooth/sdpd/sar.c')
-rw-r--r--usr.sbin/bluetooth/sdpd/sar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bluetooth/sdpd/sar.c b/usr.sbin/bluetooth/sdpd/sar.c
index 0470109ebc07..68193b567fd3 100644
--- a/usr.sbin/bluetooth/sdpd/sar.c
+++ b/usr.sbin/bluetooth/sdpd/sar.c
@@ -30,6 +30,7 @@
* $Id: sar.c,v 1.2 2004/01/08 23:46:51 max Exp $
*/
+#include <sys/param.h>
#include <sys/queue.h>
#include <sys/uio.h>
#include <netinet/in.h>
@@ -304,7 +305,7 @@ server_send_service_attribute_response(server_p srv, int32_t fd)
iov[3].iov_len = 1 + cs[0];
do {
- size = writev(fd, (struct iovec const *) &iov, sizeof(iov)/sizeof(iov[0]));
+ size = writev(fd, (struct iovec const *) &iov, nitems(iov));
} while (size < 0 && errno == EINTR);
/* Check if we have sent (or failed to sent) last response chunk */