Bruno Haible <br...@clisp.org> writes:

> Hi Simon,
>
>> Hi.  I re-read the discussion around getrandom vs gc-random and didn't
>> see any point in keeping the duplicated code.  I believe the
>> getrandom-approach is better than what was in gc-gnulib.c today, so this
>> patch make it use that function.  I have pushed the patch below.
>
> The change produces a link error when building for native Windows with MSVC:

Thanks for testing!

> diff --git a/modules/crypto/gc-random b/modules/crypto/gc-random
> index 8a5ae46..0e1bd76 100644
> --- a/modules/crypto/gc-random
> +++ b/modules/crypto/gc-random
> @@ -15,6 +15,9 @@ Makefile.am:
>  Include:
>  "gc.h"
>  
> +Link:
> +$(LIB_GETRANDOM)
> +
>  License:
>  LGPLv2+

Is this part needed?  The module depends on getrandom.  Is it because
that is only a conditional dependency?

> diff --git a/modules/crypto/gc-tests b/modules/crypto/gc-tests
> index 7b153d1..5a16ba3 100644
> --- a/modules/crypto/gc-tests
> +++ b/modules/crypto/gc-tests
> @@ -8,4 +8,4 @@ configure.ac:
>  Makefile.am:
>  TESTS += test-gc
>  check_PROGRAMS += test-gc
> -test_gc_LDADD = $(LDADD) @LIB_CRYPTO@
> +test_gc_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GETRANDOM)

Looks good to me.

/Simon

Attachment: signature.asc
Description: PGP signature

Reply via email to