On 2019/03/07 07:09, Björn Ketelaars wrote:
> Diff below brings miniupnpd to the latest version (2.1). Changelog can
> be found at
> http://miniupnp.free.fr/files/changelog.php?file=miniupnpd-2.1.tar.gz
> 
> (Lightly) tested at home by a PS4-fanatic.
> 
> OK?
> 

Most parts read okay but there's a problem here

> Index: patches/patch-testasyncsendto_c
> ===================================================================
> RCS file: /cvs/ports/net/miniupnp/miniupnpd/patches/patch-testasyncsendto_c,v
> retrieving revision 1.1
> diff -u -p -r1.1 patch-testasyncsendto_c
> --- patches/patch-testasyncsendto_c   17 Jun 2015 09:51:48 -0000      1.1
> +++ patches/patch-testasyncsendto_c   7 Mar 2019 05:53:57 -0000
> @@ -2,23 +2,24 @@ $OpenBSD: patch-testasyncsendto_c,v 1.1 
>  
>  warning: format '%ld' expects type 'long int', but argument 4 has type 
> 'time_t'
>  
> ---- testasyncsendto.c.orig   Wed Jun 17 11:12:06 2015
> -+++ testasyncsendto.c        Wed Jun 17 11:12:44 2015
> -@@ -71,7 +71,7 @@ int test(void)
> +Index: testasyncsendto.c
> +--- testasyncsendto.c.orig
> ++++ testasyncsendto.c
> +@@ -74,7 +74,7 @@ int test(void)
>               int max_fd;
>               struct timeval timeout;
>               struct timeval now;
>  -            syslog(LOG_DEBUG, "get_next_scheduled_send : %d 
> next_send=%ld.%06ld",
> -+            syslog(LOG_DEBUG, "get_next_scheduled_send : %d 
> next_send=%lld.%06ld",
> -                    i, next_send.tv_sec, next_send.tv_usec);
> ++            syslog(LOG_DEBUG, "get_next_scheduled_send : %d 
> next_send==%lld.%06ld",
> +                    i, (long)next_send.tv_sec, (long)next_send.tv_usec);
>               FD_ZERO(&writefds);
>               max_fd = 0;
> -@@ -97,7 +97,7 @@ int test(void)
> +@@ -100,7 +100,7 @@ int test(void)
>                       }
>               }
>               syslog(LOG_DEBUG, "get_sendto_fds() returned %d", i);
>  -            syslog(LOG_DEBUG, "select(%d, NULL, xx, NULL, %ld.%06ld)",
>  +            syslog(LOG_DEBUG, "select(%d, NULL, xx, NULL, %lld.%06ld)",
> -                    max_fd, timeout.tv_sec, timeout.tv_usec);
> +                    max_fd, (long)timeout.tv_sec, (long)timeout.tv_usec);
>               i = select(max_fd, NULL, &writefds, NULL, &timeout);
>               if(i < 0) {

Upstream fixed the format strings/variable mismatch and the updated patch
is bringing back the problem in the other direction.

Either remove the whole patch (good until time_t wrap...at least it's
the test rather than the main code), or keep the format string patches
and change the cast from long to long long.

Reply via email to