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);
                                  ^~~~~~
This commit is contained in:
Piotr Kubaj 2022-09-22 10:13:38 +00:00
parent 0f708f63d0
commit 27cb6d67b3
1 changed files with 11 additions and 0 deletions

View File

@ -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;
}