summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-06-27 15:30:56 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-06-27 15:37:03 +0100
commit6777425636d1c04494e52c61dc44f523458d12d3 (patch)
tree8e60c9e182f60d7b9acd253e7799d209455fd579
parent6afb7336e33dc28c4fd1a4545a8298ee36c10723 (diff)
downloadlibguestfs-6777425636d1c04494e52c61dc44f523458d12d3.tar.gz
libguestfs-6777425636d1c04494e52c61dc44f523458d12d3.tar.xz
libguestfs-6777425636d1c04494e52c61dc44f523458d12d3.zip
src/actions.c: Include <config.h> in this generated file.
On RHEL 5, because _GNU_SOURCE was not defined, open_memstream was not being declared, resulting in miscompilation and a segfault in the trace code whenever open_memstream returned a pointer >= 0x80000000 (which would be truncated to a 32 bit int and then sign-extended).
-rw-r--r--generator/generator_c.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/generator/generator_c.ml b/generator/generator_c.ml
index 3e7f314a..d2275acc 100644
--- a/generator/generator_c.ml
+++ b/generator/generator_c.ml
@@ -658,6 +658,8 @@ and generate_client_actions () =
generate_header CStyle LGPLv2plus;
pr "\
+#include <config.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>