From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 21A0F3858D20; Wed, 9 Aug 2023 09:41:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21A0F3858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1691574082; bh=mRE4qjnvVkKe8Qkz6xs7z2pz6fRCJfjTWgHh1U0Yf38=; h=From:To:Subject:Date:From; b=qBoulKRWW8HvR/bL1dUTS0+IPZdiUcKnEHoKBo49rcVkCXQZajfo0bQXc2JEvxgP0 gsPyNxQWng2sjJJD5pm7strnaIsZECTQMm7s5BslFksUqn4qN9oXKVvlvtjPSA6sGO d4VPEg3Z7St7jfpt+hfh3JBmSSfX1W2QtLaJasOE= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin/main] Add stub for getentropy X-Act-Checkin: newlib-cygwin X-Git-Author: =?utf-8?q?Torbj=C3=B6rn_SVENSSON?= X-Git-Refname: refs/heads/main X-Git-Oldrev: cbe7543cdfdb7f3d270214877d4a4c3e78710bd3 X-Git-Newrev: b9e867d088935d9f0bf312e6dbf3e4976850dfd3 Message-Id: <20230809094122.21A0F3858D20@sourceware.org> Date: Wed, 9 Aug 2023 09:41:22 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3Db9e867d0889= 35d9f0bf312e6dbf3e4976850dfd3 commit b9e867d088935d9f0bf312e6dbf3e4976850dfd3 Author: Torbj=C3=B6rn SVENSSON AuthorDate: Tue Aug 8 18:09:50 2023 +0200 Commit: Corinna Vinschen CommitDate: Wed Aug 9 11:38:03 2023 +0200 Add stub for getentropy =20 Example test case that fails with undefined reference to getentropy: =20 Testing g++.robertl/eb77.C, -std=3Dc++20 doing compile Executing on host: /build/gcc-13-2709-g9ac9fde961f/bin/arm-none-eabi-g+= + /build/src/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb77.C -mthumb -m= arch=3Darmv6s-m -mcpu=3Dcortex-m0 -mfloat-abi=3Dsoft -fdiagnostics-plain-ou= tput -fmessage-length=3D0 -std=3Dc++20 -pedantic-errors -Wno-long-long = -Wl,--start-group -lc -lm -Wl,--end-group --specs=3Dnosys.specs -Wl,-= -allow-multiple-definition -Wl,-u,_isatty,-u,_fstat -Wl,-wrap,exit -Wl,-w= rap,_exit -Wl,-wrap,main -Wl,-wrap,abort -Wl,g++_tg.o -lm -o ./eb77.exe = (timeout =3D 800) spawn -ignore SIGHUP /build/gcc-13-2709-g9ac9fde961f/bin/arm-none-eabi-= g++ /build/src/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb77.C -mthumb -m= arch=3Darmv6s-m -mcpu=3Dcortex-m0 -mfloat-abi=3Dsoft -fdiagnostics-plain-ou= tput -fmessage-length=3D0 -std=3Dc++20 -pedantic-errors -Wno-long-long -Wl,= --start-group -lc -lm -Wl,--end-group --specs=3Dnosys.specs -Wl,--allow-mul= tiple-definition -Wl,-u,_isatty,-u,_fstat -Wl,-wrap,exit -Wl,-wrap,_exit -W= l,-wrap,main -Wl,-wrap,abort -Wl,g++_tg.o -lm -o ./eb77.exe pid is 28414 -28414 /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../= ../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bin/../lib/g= cc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libst= dc++.a(random.o): in function `std::(anonymous namespace)::__libc_getentrop= y(void*)': (.text._ZNSt12_GLOBAL__N_117__libc_getentropyEPv+0x8): undefined refere= nce to `getentropy' /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../= ../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bin/../lib/g= cc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libst= dc++.a(random.o): in function `std::random_device::_M_init(std::__cxx11::ba= sic_string, std::allocator > const&)': (.text._ZNSt13random_device7_M_initERKNSt7__cxx1112basic_stringIcSt11ch= ar_traitsIcESaIcEEE+0x58): undefined reference to `getentropy' /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../= ../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bin/../lib/g= cc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc.= a(libc_a-arc4random.o): in function `_rs_stir': (.text._rs_stir+0x8): undefined reference to `getentropy' collect2: error: ld returned 1 exit status pid is -1 close result is 28414 exp6 0 1 output is /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/= 13.0.0/../../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bi= n/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/= nofp/libstdc++.a(random.o): in function `std::(anonymous namespace)::__libc= _getentropy(void*)': (.text._ZNSt12_GLOBAL__N_117__libc_getentropyEPv+0x8): undefined refere= nce to `getentropy' /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../= ../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bin/../lib/g= cc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libst= dc++.a(random.o): in function `std::random_device::_M_init(std::__cxx11::ba= sic_string, std::allocator > const&)': (.text._ZNSt13random_device7_M_initERKNSt7__cxx1112basic_stringIcSt11ch= ar_traitsIcESaIcEEE+0x58): undefined reference to `getentropy' /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../= ../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bin/../lib/g= cc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc.= a(libc_a-arc4random.o): in function `_rs_stir': (.text._rs_stir+0x8): undefined reference to `getentropy' collect2: error: ld returned 1 exit status status 1 compiler exited with status 1 FAIL: g++.old-deja/g++.robertl/eb77.C -std=3Dc++20 (test for excess er= rors) Excess errors: (.text._ZNSt12_GLOBAL__N_117__libc_getentropyEPv+0x8): undefined refere= nce to `getentropy' (.text._ZNSt13random_device7_M_initERKNSt7__cxx1112basic_stringIcSt11ch= ar_traitsIcESaIcEEE+0x58): undefined reference to `getentropy' (.text._rs_stir+0x8): undefined reference to `getentropy' UNRESOLVED: g++.old-deja/g++.robertl/eb77.C -std=3Dc++20 compilation f= ailed to produce executable =20 Contributed by STMicroelectronics =20 Signed-off-by: Torbj=C3=B6rn SVENSSON Diff: --- libgloss/Makefile.in | 5 ++ libgloss/libnosys/Makefile.inc | 1 + libgloss/libnosys/getentropy.c | 21 +++++ newlib/Makefile.in | 147 ++++++++++++++++++++++---------= ---- newlib/libc/include/_syslist.h | 1 + newlib/libc/include/reent.h | 2 + newlib/libc/reent/Makefile.inc | 2 + newlib/libc/reent/getentropyr.c | 53 +++++++++++++ newlib/libc/syscalls/Makefile.inc | 1 + newlib/libc/syscalls/sysgetentropy.c | 12 +++ 10 files changed, 191 insertions(+), 54 deletions(-) diff --git a/libgloss/Makefile.in b/libgloss/Makefile.in index 187d0edb003d..7f46375c0cab 100644 --- a/libgloss/Makefile.in +++ b/libgloss/Makefile.in @@ -409,6 +409,7 @@ libnosys_libnosys_a_LIBADD =3D @CONFIG_LIBNOSYS_TRUE@ libnosys/unlink.$(OBJEXT) \ @CONFIG_LIBNOSYS_TRUE@ libnosys/wait.$(OBJEXT) \ @CONFIG_LIBNOSYS_TRUE@ libnosys/write.$(OBJEXT) \ +@CONFIG_LIBNOSYS_TRUE@ libnosys/getentropy.$(OBJEXT) \ @CONFIG_LIBNOSYS_TRUE@ libnosys/_exit.$(OBJEXT) libnosys_libnosys_a_OBJECTS =3D $(am_libnosys_libnosys_a_OBJECTS) libobjs_a_AR =3D $(AR) $(ARFLAGS) @@ -991,6 +992,7 @@ TEXINFO_TEX =3D ../texinfo/texinfo.tex @CONFIG_LIBNOSYS_TRUE@ libnosys/unlink.c \ @CONFIG_LIBNOSYS_TRUE@ libnosys/wait.c \ @CONFIG_LIBNOSYS_TRUE@ libnosys/write.c \ +@CONFIG_LIBNOSYS_TRUE@ libnosys/getentropy.c \ @CONFIG_LIBNOSYS_TRUE@ libnosys/_exit.c =20 @CONFIG_LM32_TRUE@lm32_libgloss_a_SOURCES =3D \ @@ -1558,6 +1560,8 @@ libnosys/wait.$(OBJEXT): libnosys/$(am__dirstamp) \ libnosys/$(DEPDIR)/$(am__dirstamp) libnosys/write.$(OBJEXT): libnosys/$(am__dirstamp) \ libnosys/$(DEPDIR)/$(am__dirstamp) +libnosys/getentropy.$(OBJEXT): libnosys/$(am__dirstamp) \ + libnosys/$(DEPDIR)/$(am__dirstamp) libnosys/_exit.$(OBJEXT): libnosys/$(am__dirstamp) \ libnosys/$(DEPDIR)/$(am__dirstamp) =20 @@ -1958,6 +1962,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@libnosys/$(DEPDIR)/execve.Po@am__quot= e@ @AMDEP_TRUE@@am__include@ @am__quote@libnosys/$(DEPDIR)/fork.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libnosys/$(DEPDIR)/fstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libnosys/$(DEPDIR)/getentropy.Po@am__= quote@ @AMDEP_TRUE@@am__include@ @am__quote@libnosys/$(DEPDIR)/getpid.Po@am__quot= e@ @AMDEP_TRUE@@am__include@ @am__quote@libnosys/$(DEPDIR)/gettod.Po@am__quot= e@ @AMDEP_TRUE@@am__include@ @am__quote@libnosys/$(DEPDIR)/isatty.Po@am__quot= e@ diff --git a/libgloss/libnosys/Makefile.inc b/libgloss/libnosys/Makefile.inc index 5e69072e7872..334f694af177 100644 --- a/libgloss/libnosys/Makefile.inc +++ b/libgloss/libnosys/Makefile.inc @@ -24,4 +24,5 @@ multilibtool_LIBRARIES +=3D %D%/libnosys.a %D%/unlink.c \ %D%/wait.c \ %D%/write.c \ + %D%/getentropy.c \ %D%/_exit.c diff --git a/libgloss/libnosys/getentropy.c b/libgloss/libnosys/getentropy.c new file mode 100644 index 000000000000..5c4d3a83475e --- /dev/null +++ b/libgloss/libnosys/getentropy.c @@ -0,0 +1,21 @@ +/* + * Stub version of getentropy. + */ + +#include "config.h" +#include <_ansi.h> +#include <_syslist.h> +#include +#undef errno +extern int errno; +#include "warning.h" + +int +_getentropy (void *buf, + size_t buflen) +{ + errno =3D ENOSYS; + return -1; +} + +stub_warning(_getentropy) diff --git a/newlib/Makefile.in b/newlib/Makefile.in index 4d2b5e7825cb..6e5b0fbd6a43 100644 --- a/newlib/Makefile.in +++ b/newlib/Makefile.in @@ -391,6 +391,7 @@ check_PROGRAMS =3D @HAVE_SYSCALL_DIR_TRUE@ libc/syscalls/sysclose.c \ @HAVE_SYSCALL_DIR_TRUE@ libc/syscalls/sysfcntl.c \ @HAVE_SYSCALL_DIR_TRUE@ libc/syscalls/sysfstat.c \ +@HAVE_SYSCALL_DIR_TRUE@ libc/syscalls/sysgetentropy.c \ @HAVE_SYSCALL_DIR_TRUE@ libc/syscalls/sysgetpid.c \ @HAVE_SYSCALL_DIR_TRUE@ libc/syscalls/sysgettod.c \ @HAVE_SYSCALL_DIR_TRUE@ libc/syscalls/sysisatty.c \ @@ -1438,6 +1439,7 @@ am__objects_28 =3D libc/reent/libc_a-execr.$(OBJEXT) @HAVE_SYSCALL_DIR_TRUE@am__objects_44 =3D libc/syscalls/libc_a-sysclose.$(= OBJEXT) \ @HAVE_SYSCALL_DIR_TRUE@ libc/syscalls/libc_a-sysfcntl.$(OBJEXT) \ @HAVE_SYSCALL_DIR_TRUE@ libc/syscalls/libc_a-sysfstat.$(OBJEXT) \ +@HAVE_SYSCALL_DIR_TRUE@ libc/syscalls/libc_a-sysgetentropy.$(OBJEXT) \ @HAVE_SYSCALL_DIR_TRUE@ libc/syscalls/libc_a-sysgetpid.$(OBJEXT) \ @HAVE_SYSCALL_DIR_TRUE@ libc/syscalls/libc_a-sysgettod.$(OBJEXT) \ @HAVE_SYSCALL_DIR_TRUE@ libc/syscalls/libc_a-sysisatty.$(OBJEXT) \ @@ -2521,6 +2523,7 @@ am_libc_a_OBJECTS =3D $(am__objects_1) \ libc/reent/libc_a-impure.$(OBJEXT) \ libc/reent/libc_a-fcntlr.$(OBJEXT) \ libc/reent/libc_a-fstatr.$(OBJEXT) \ + libc/reent/libc_a-getentropyr.$(OBJEXT) \ libc/reent/libc_a-getreent.$(OBJEXT) \ libc/reent/libc_a-gettimeofdayr.$(OBJEXT) \ libc/reent/libc_a-isattyr.$(OBJEXT) \ @@ -4092,50 +4095,50 @@ libc_a_SOURCES =3D $(am__append_5) libc/stdlib/__ad= just.c \ libc/locale/setlocale.h libc/locale/locale.c \ libc/locale/localeconv.c $(am__append_19) libc/reent/closer.c \ libc/reent/reent.c libc/reent/impure.c libc/reent/fcntlr.c \ - libc/reent/fstatr.c libc/reent/getreent.c \ - libc/reent/gettimeofdayr.c libc/reent/isattyr.c \ - libc/reent/linkr.c libc/reent/lseekr.c libc/reent/mkdirr.c \ - libc/reent/openr.c libc/reent/readr.c libc/reent/renamer.c \ - libc/reent/signalr.c libc/reent/sbrkr.c libc/reent/statr.c \ - libc/reent/timesr.c libc/reent/unlinkr.c libc/reent/writer.c \ - $(am__append_21) $(am__append_22) $(am__append_23) \ - libc/errno/errno.c libc/misc/__dprintf.c libc/misc/unctrl.c \ - libc/misc/ffs.c libc/misc/init.c libc/misc/fini.c \ - $(am__append_24) $(am__append_25) $(am__append_26) \ - $(am__append_27) $(am__append_28) $(am__append_29) \ - $(am__append_30) $(am__append_31) $(am__append_32) \ - $(am__append_33) $(am__append_34) $(am__append_35) \ - $(am__append_36) $(am__append_38) $(am__append_41) \ - $(am__append_42) $(am__append_43) $(am__append_44) \ - $(am__append_45) $(am__append_46) $(am__append_47) \ - $(am__append_48) $(am__append_49) $(am__append_50) \ - $(am__append_51) $(am__append_52) $(am__append_53) \ - $(am__append_54) $(am__append_55) $(am__append_56) \ - $(am__append_57) $(am__append_58) $(am__append_59) \ - $(am__append_60) $(am__append_61) $(am__append_62) \ - $(am__append_63) $(am__append_64) $(am__append_65) \ - $(am__append_66) $(am__append_67) $(am__append_68) \ - $(am__append_69) $(am__append_70) $(am__append_71) \ - $(am__append_73) $(am__append_74) $(am__append_75) \ - $(am__append_76) $(am__append_77) $(am__append_78) \ - $(am__append_79) $(am__append_80) $(am__append_81) \ - $(am__append_82) $(am__append_83) $(am__append_84) \ - $(am__append_85) $(am__append_86) $(am__append_87) \ - $(am__append_88) $(am__append_89) $(am__append_90) \ - $(am__append_91) $(am__append_92) $(am__append_93) \ - $(am__append_94) $(am__append_95) $(am__append_96) \ - $(am__append_97) $(am__append_98) $(am__append_99) \ - $(am__append_100) $(am__append_101) $(am__append_102) \ - $(am__append_103) $(am__append_104) $(am__append_105) \ - $(am__append_106) $(am__append_107) $(am__append_108) \ - $(am__append_109) $(am__append_110) $(am__append_111) \ - $(am__append_112) $(am__append_113) $(am__append_114) \ - $(am__append_115) $(am__append_116) $(am__append_117) \ - $(am__append_118) $(am__append_119) $(am__append_120) \ - $(am__append_121) $(am__append_122) $(am__append_123) \ - $(am__append_124) $(am__append_125) $(am__append_126) \ - $(am__append_127) $(am__append_128) $(am__append_129) \ - $(am__append_130) + libc/reent/fstatr.c libc/reent/getentropyr.c \ + libc/reent/getreent.c libc/reent/gettimeofdayr.c \ + libc/reent/isattyr.c libc/reent/linkr.c libc/reent/lseekr.c \ + libc/reent/mkdirr.c libc/reent/openr.c libc/reent/readr.c \ + libc/reent/renamer.c libc/reent/signalr.c libc/reent/sbrkr.c \ + libc/reent/statr.c libc/reent/timesr.c libc/reent/unlinkr.c \ + libc/reent/writer.c $(am__append_21) $(am__append_22) \ + $(am__append_23) libc/errno/errno.c libc/misc/__dprintf.c \ + libc/misc/unctrl.c libc/misc/ffs.c libc/misc/init.c \ + libc/misc/fini.c $(am__append_24) $(am__append_25) \ + $(am__append_26) $(am__append_27) $(am__append_28) \ + $(am__append_29) $(am__append_30) $(am__append_31) \ + $(am__append_32) $(am__append_33) $(am__append_34) \ + $(am__append_35) $(am__append_36) $(am__append_38) \ + $(am__append_41) $(am__append_42) $(am__append_43) \ + $(am__append_44) $(am__append_45) $(am__append_46) \ + $(am__append_47) $(am__append_48) $(am__append_49) \ + $(am__append_50) $(am__append_51) $(am__append_52) \ + $(am__append_53) $(am__append_54) $(am__append_55) \ + $(am__append_56) $(am__append_57) $(am__append_58) \ + $(am__append_59) $(am__append_60) $(am__append_61) \ + $(am__append_62) $(am__append_63) $(am__append_64) \ + $(am__append_65) $(am__append_66) $(am__append_67) \ + $(am__append_68) $(am__append_69) $(am__append_70) \ + $(am__append_71) $(am__append_73) $(am__append_74) \ + $(am__append_75) $(am__append_76) $(am__append_77) \ + $(am__append_78) $(am__append_79) $(am__append_80) \ + $(am__append_81) $(am__append_82) $(am__append_83) \ + $(am__append_84) $(am__append_85) $(am__append_86) \ + $(am__append_87) $(am__append_88) $(am__append_89) \ + $(am__append_90) $(am__append_91) $(am__append_92) \ + $(am__append_93) $(am__append_94) $(am__append_95) \ + $(am__append_96) $(am__append_97) $(am__append_98) \ + $(am__append_99) $(am__append_100) $(am__append_101) \ + $(am__append_102) $(am__append_103) $(am__append_104) \ + $(am__append_105) $(am__append_106) $(am__append_107) \ + $(am__append_108) $(am__append_109) $(am__append_110) \ + $(am__append_111) $(am__append_112) $(am__append_113) \ + $(am__append_114) $(am__append_115) $(am__append_116) \ + $(am__append_117) $(am__append_118) $(am__append_119) \ + $(am__append_120) $(am__append_121) $(am__append_122) \ + $(am__append_123) $(am__append_124) $(am__append_125) \ + $(am__append_126) $(am__append_127) $(am__append_128) \ + $(am__append_129) $(am__append_130) libc_a_CFLAGS =3D $(AM_CFLAGS) $(libc_a_CFLAGS_$(subst /,_,$(@D))) $(libc_= a_CFLAGS_$(subst /,_,$(@D)_$( +#include +#include <_syslist.h> + +/* Some targets provides their own versions of these functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifndef REENTRANT_SYSCALLS_PROVIDED + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_getentropy_r>>---Reentrant version of getentropy + +INDEX + _getentropy_r + +SYNOPSIS + #include + int _getentropy_r(struct _reent *<[ptr]>, + void *<[buf]>, size_t <[buflen]>); + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +int +_getentropy_r (struct _reent *ptr, + void *buf, + size_t buflen) +{ + int ret; + + errno =3D 0; + if ((ret =3D _getentropy (buf, buflen)) =3D=3D -1 && errno !=3D 0) + _REENT_ERRNO(ptr) =3D errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */ diff --git a/newlib/libc/syscalls/Makefile.inc b/newlib/libc/syscalls/Makef= ile.inc index 627a4dfd2f59..7f7bbbddb6d7 100644 --- a/newlib/libc/syscalls/Makefile.inc +++ b/newlib/libc/syscalls/Makefile.inc @@ -4,6 +4,7 @@ libc_a_SOURCES +=3D \ %D%/sysclose.c \ %D%/sysfcntl.c \ %D%/sysfstat.c \ + %D%/sysgetentropy.c \ %D%/sysgetpid.c \ %D%/sysgettod.c \ %D%/sysisatty.c \ diff --git a/newlib/libc/syscalls/sysgetentropy.c b/newlib/libc/syscalls/sy= sgetentropy.c new file mode 100644 index 000000000000..d68ccbc72af7 --- /dev/null +++ b/newlib/libc/syscalls/sysgetentropy.c @@ -0,0 +1,12 @@ +/* connector for getentropy */ + +#include +#include +#include + +int +getentropy (void *buf, + size_t buflen) +{ + return _getentropy_r (_REENT, buf, buflen); +}