[Libguestfs] [PATCH] gnulib: Define argv[0] as program_name for error.c on Darwin
Pino Toscano
ptoscano at redhat.com
Thu Feb 12 18:50:40 UTC 2015
On Thursday 12 February 2015 17:39:45 Margaret Lewicka wrote:
> ---
> lib/error.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/lib/error.c b/lib/error.c
> index 6683197..36a3db7 100644
> --- a/lib/error.c
> +++ b/lib/error.c
> @@ -113,9 +113,13 @@ int strerror_r ();
> # endif
> # endif
>
> +#if defined __APPLE__ && defined __MACH__
> +#define program_name (((char **)*_NSGetArgv())[0])
> +#else
> /* The calling program should define program_name and set it to the
> name of the executing program. */
> extern char *program_name;
> +#endif
>
> # if HAVE_STRERROR_R || defined strerror_r
> # define __strerror_r strerror_r
>
We import gnulib as git submodule from the upstream gnulib.git, so
this should be sent to its mailing list; see also
https://www.gnu.org/software/gnulib/
(Personally, I'm not sure that the above patch would help, but I'll
leave the review to gnulib people on the right ml.)
Thanks,
--
Pino Toscano
More information about the Libguestfs
mailing list