[Libguestfs] [PATCH] lua, perl: Use thread-safe strerror_r instead of strerror (RHBZ#1536763).
Pino Toscano
ptoscano at redhat.com
Mon Jan 22 17:19:33 UTC 2018
On Monday, 22 January 2018 18:02:08 CET Richard W.M. Jones wrote:
> ---
> generator/lua.ml | 22 +++++++++++++++-------
> generator/perl.ml | 2 +-
> lua/Makefile.am | 1 +
> 3 files changed, 17 insertions(+), 8 deletions(-)
Ah, you just beat me to it... OTOH you missed the ruby binding, see
ruby/ext/guestfs/handle.c.
> diff --git a/generator/lua.ml b/generator/lua.ml
> index dd6aedbe9..7cfceb152 100644
> --- a/generator/lua.ml
> +++ b/generator/lua.ml
> @@ -63,6 +63,8 @@ let generate_lua_c () =
> #endif
> #endif
>
> +#include \"ignore-value.h\"
In my local version, ignore_value() was not needed in the lua bindings
Did you get a build failure without it?
> #include <guestfs.h>
> #include \"guestfs-utils.h\"
>
> @@ -142,6 +144,7 @@ guestfs_int_lua_create (lua_State *L)
> guestfs_h *g;
> struct userdata *u;
> unsigned flags = 0;
> + char err[128];
In other places were strerror_r is used, the size of the buffer is 256.
Can you please adapt it? (Mostly so we have the same code everywhere.)
Thanks,
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20180122/5620119b/attachment.sig>
More information about the Libguestfs
mailing list