commit: 35ec1d214359c035a45c4c51c1072f819f421894
parent 13876852ca0f20253118cac61d0b09b56ac1c132
Author: Michael Forney <mforney@mforney.org>
Date: Tue, 28 Jan 2020 22:48:18 -0800
msmtp: Add patch to silence warning
Diffstat:
2 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/pkg/msmtp/patch/0002-Explicitly-cast-struct-sockaddr_in-6-to-struct-socka.patch b/pkg/msmtp/patch/0002-Explicitly-cast-struct-sockaddr_in-6-to-struct-socka.patch
@@ -0,0 +1,39 @@
+From c2649a6e9557d23ad8a54c1a4efa585582896529 Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Tue, 28 Jan 2020 22:43:16 -0800
+Subject: [PATCH] Explicitly cast `struct sockaddr_in[6] *` to `struct sockaddr
+ *`
+
+This prevents a couple warnings due to implicit conversion:
+
+net.c:336:25: warning: passing argument 2 of 'bind' from incompatible pointer type [-Wincompatible-pointer-types]
+net.c:344:29: warning: passing argument 2 of 'bind' from incompatible pointer type [-Wincompatible-pointer-types]
+---
+ src/net.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/net.c b/src/net.c
+index 76191c9..cfba57a 100644
+--- a/src/net.c
++++ b/src/net.c
+@@ -333,7 +333,7 @@ int net_bind_source_ip_to_socket(int fd, const char *source_ip)
+ if (inet_pton(AF_INET6, source_ip, &sa6.sin6_addr) != 0)
+ {
+ sa6.sin6_family = AF_INET6;
+- return bind(fd, &sa6, sizeof(sa6));
++ return bind(fd, (struct sockaddr *)&sa6, sizeof(sa6));
+ }
+ else
+ {
+@@ -341,7 +341,7 @@ int net_bind_source_ip_to_socket(int fd, const char *source_ip)
+ if (inet_pton(AF_INET, source_ip, &sa4.sin_addr) != 0)
+ {
+ sa4.sin_family = AF_INET;
+- return bind(fd, &sa4, sizeof(sa4));
++ return bind(fd, (struct sockaddr *)&sa4, sizeof(sa4));
+ }
+ else
+ {
+--
+2.25.0
+
diff --git a/pkg/msmtp/ver b/pkg/msmtp/ver
@@ -1 +1 @@
-1.8.7 r0
+1.8.7 r1