git: 27cb6d67b3c5 - main - net/beanstalkd: fix build on 32-bits by specifying correct format specifier

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Thu, 22 Sep 2022 11:26:39 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=27cb6d67b3c56f090689325d5f9ee49da8980215

commit 27cb6d67b3c56f090689325d5f9ee49da8980215
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-09-22 10:13:38 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-09-22 10:13:38 +0000

    net/beanstalkd: fix build on 32-bits by specifying correct format specifier
    
    net.c:162:21: error: format specifies type 'long' but the argument has type 'unsigned int' [-Werror,-Wformat]
                  path, strlen(path), maxlen);
                        ^~~~~~~~~~~~
    net.c:162:35: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
                  path, strlen(path), maxlen);
                                      ^~~~~~
---
 net/beanstalkd/files/patch-net.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/net/beanstalkd/files/patch-net.c b/net/beanstalkd/files/patch-net.c
new file mode 100644
index 000000000000..cbf825fe6aac
--- /dev/null
+++ b/net/beanstalkd/files/patch-net.c
@@ -0,0 +1,11 @@
+--- net.c.orig	2022-09-17 01:28:31 UTC
++++ net.c
+@@ -158,7 +158,7 @@ make_unix_socket(char *path)
+     memset(&addr, 0, sizeof(struct sockaddr_un));
+     addr.sun_family = AF_UNIX;
+     if (strlen(path) > maxlen) {
+-        warnx("socket path %s is too long (%ld characters), where maximum allowed is %ld",
++        warnx("socket path %s is too long (%zu characters), where maximum allowed is %zu",
+               path, strlen(path), maxlen);
+         return -1;
+     }