Hi, Le 30/09/2022 à 17:09, Wilco Dijkstra via Libc-alpha a écrit : > Hi Adhemerval, > > This looks good to me assuming Hurd is 32-bit only. > > Reviewed-by: Wilco Dijkstra > > Cheers, > Wilco > > > From: Adhemerval Zanella > > Use INTERNAL_SYSCALL_CALL instead of INLINE_SYSCALL_CALL.  This > requires emulate the semantic for hurd call (so __arc4random_buf > uses the fallback). > > Checked on x86_64-linux-gnu. > --- > diff --git a/sysdeps/mach/hurd/not-cancel.h b/sysdeps/mach/hurd/not-cancel.h > index ae58b734e3..5d2d2b4b8a 100644 > --- a/sysdeps/mach/hurd/not-cancel.h > +++ b/sysdeps/mach/hurd/not-cancel.h > @@ -25,6 +25,7 @@ >  #include >  #include >  #include > +#include >  #include >  #include > > @@ -75,8 +76,15 @@ __typeof (__fcntl) __fcntl_nocancel; >  #define __fcntl64_nocancel(...) \ >    __fcntl_nocancel (__VA_ARGS__) > > -#define __getrandom_nocancel(buf, size, flags) \ > -  __getrandom (buf, size, flags) > +static inline int ssize_t > +__getrandom_nocancel (void *buf, size_t buflen, unsigned int flags) > +{ > +  int save_errno = errno; > +  int r = __getrandom (buf, buflen, flags); ssize_t r > +  r = r == -1 ? -errno : r; > +  __set_errno (save_errno); > +  return r; > +} > Regards. -- Yann Droneaud OPTEYA