[PATCH v2 2/2] vsh: Define HAVE_STDARG_H before including readline

Ján Tomko jtomko at redhat.com
Thu Sep 3 14:18:43 UTC 2020


On a Thursday in 2020, Michal Privoznik wrote:
>As it turned out my previous commits which switched from HAVE_ to
>WITH_ and dropped stdarg.h detection were a bit too aggressive.
>Because of reasons described in 9ea3424a178 we need to define
>HAVE_STDARG_H before including readline otherwise macos build
>fails. Honestly, I still don't fully understand the problem so I
>am not going to bother you with "explanation".
>
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> tools/vsh.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/tools/vsh.c b/tools/vsh.c
>index 2511089e6e..ef2a3f62d7 100644
>--- a/tools/vsh.c
>+++ b/tools/vsh.c
>@@ -30,6 +30,10 @@
> #include <signal.h>
>
> #if WITH_READLINE
>+/* In order to have proper rl_message declaration with older
>+ * versions of readline, we have to declare this. See 9ea3424a178

I don't think it's because of the 'older version', I'm surprised it
works for me on Linux without it.

>+ * for more info. */
>+# define HAVE_STDARG_H
> # include <readline/readline.h>
> # include <readline/history.h>
> #endif

Reviewed-by: Ján Tomko <jtomko at redhat.com>

(just don't expect it to fix the pipeline on master, some other issues
have creeped in in the meantime)

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200903/a524e2b8/attachment-0001.sig>


More information about the libvir-list mailing list