git: 8d9f3e05728e - main - netlink: fix format strings on 32-bit platforms

From: Alexander V. Chernikov <melifaro_at_FreeBSD.org>
Date: Sat, 01 Oct 2022 21:16:55 UTC
The branch main has been updated by melifaro:

URL: https://cgit.FreeBSD.org/src/commit/?id=8d9f3e05728ecef4e21672dd8a54066b17b62a50

commit 8d9f3e05728ecef4e21672dd8a54066b17b62a50
Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2022-10-01 21:16:31 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2022-10-01 21:16:31 +0000

    netlink: fix format strings on 32-bit platforms
---
 sys/netlink/netlink_domain.c | 1 +
 sys/netlink/netlink_io.c     | 8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c
index 032fded987df..936a5438fa4a 100644
--- a/sys/netlink/netlink_domain.c
+++ b/sys/netlink/netlink_domain.c
@@ -37,6 +37,7 @@
 #include <sys/domain.h>
 #include <sys/mbuf.h>
 #include <sys/protosw.h>
+#include <sys/proc.h>
 #include <sys/ck.h>
 #include <sys/socket.h>
 #include <sys/socketvar.h>
diff --git a/sys/netlink/netlink_io.c b/sys/netlink/netlink_io.c
index ef1c2c73a10e..5a0f195ed382 100644
--- a/sys/netlink/netlink_io.c
+++ b/sys/netlink/netlink_io.c
@@ -282,8 +282,8 @@ nl_on_transmit(struct nlpcb *nlp)
 
 	struct socket *so = nlp->nl_socket;
 	if (__predict_false(nlp->nl_dropped_bytes > 0 && so != NULL)) {
-		uint64_t dropped_bytes = nlp->nl_dropped_bytes;
-		uint64_t dropped_messages = nlp->nl_dropped_messages;
+		unsigned long dropped_bytes = nlp->nl_dropped_bytes;
+		unsigned long dropped_messages = nlp->nl_dropped_messages;
 		nlp->nl_dropped_bytes = 0;
 		nlp->nl_dropped_messages = 0;
 
@@ -385,8 +385,8 @@ nl_send_one(struct mbuf *m, struct nlpcb *nlp, int num_messages, int io_flags)
 			nlp->nl_dropped_bytes += m_length(m, NULL);
 			nlp->nl_dropped_messages += num_messages;
 			NLP_LOG(LOG_DEBUG2, nlp, "RX oveflow: %lu m (+%d), %lu b (+%d)",
-			    nlp->nl_dropped_messages, num_messages,
-			    nlp->nl_dropped_bytes, m_length(m, NULL));
+			    (unsigned long)nlp->nl_dropped_messages, num_messages,
+			    (unsigned long)nlp->nl_dropped_bytes, m_length(m, NULL));
 			soroverflow(so);
 			m_freem(m);
 			result = false;