On 2013/10/23 17:37, Jérémie Courrèges-Anglas wrote:
> this fixes nxssh after arc4random removal.  While here, add a missing
> item to WANTLIB.  ok?

this or something similar will need to go to portable openssh for
any other OS that pick up the arc4random changes..

> --- patches/patch-configure   17 Jun 2013 19:31:32 -0000      1.3
> +++ patches/patch-configure   23 Oct 2013 15:29:05 -0000
> @@ -1,6 +1,7 @@
>  $OpenBSD: patch-configure,v 1.3 2013/06/17 19:31:32 ajacoutot Exp $
> +Check for arc4random_stir.
>  --- configure.orig   Tue Oct  2 19:02:53 2007
> -+++ configure        Sat Oct 16 13:40:59 2010
> ++++ configure        Wed Oct 23 17:28:08 2013
>  @@ -4668,10 +4668,10 @@ TEST_SHELL=sh
>   
>   
> @@ -14,3 +15,11 @@ $OpenBSD: patch-configure,v 1.3 2013/06/
>   
>   # Extract the first word of "groupadd", so it can be a program name with 
> args.
>   set dummy groupadd; ac_word=$2
> +@@ -12403,6 +12403,7 @@ fi
> + 
> + for ac_func in \
> +     arc4random \
> ++    arc4random_stir \
> +     asprintf \
> +     b64_ntop \
> +     __b64_ntop \
> Index: patches/patch-openbsd-compat_openbsd-compat_h
> ===================================================================
> RCS file: patches/patch-openbsd-compat_openbsd-compat_h
> diff -N patches/patch-openbsd-compat_openbsd-compat_h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-openbsd-compat_openbsd-compat_h     23 Oct 2013 15:28:54 
> -0000
> @@ -0,0 +1,21 @@
> +$OpenBSD$
> +OpenBSD does not need nor provide arc4random_stir.
> +--- openbsd-compat/openbsd-compat.h.orig     Wed Oct 23 17:23:42 2013
> ++++ openbsd-compat/openbsd-compat.h  Wed Oct 23 17:27:05 2013
> +@@ -146,10 +146,14 @@ int writev(int, struct iovec *, int);
> + int getpeereid(int , uid_t *, gid_t *);
> + #endif 
> + 
> +-#ifndef HAVE_ARC4RANDOM
> ++#ifdef HAVE_ARC4RANDOM
> ++# ifndef HAVE_ARC4RANDOM_STIR
> ++#  define arc4random_stir()
> ++# endif
> ++#else
> + unsigned int arc4random(void);
> + void arc4random_stir(void);
> +-#endif /* !HAVE_ARC4RANDOM */
> ++#endif /* HAVE_ARC4RANDOM */
> + 
> + #ifndef HAVE_ASPRINTF
> + int asprintf(char **, const char *, ...);
> 

Reply via email to