summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2010-11-11 23:18:57 +0000
committerRichard W.M. Jones <rjones@redhat.com>2010-11-11 23:29:46 +0000
commit096f341714ee7d1575c93d437a8085821aa88d23 (patch)
tree10fd97347c84439c36d30144e20614bd92acde92
parent649b990bbfe4127841d73ae86c92cc902ec56e93 (diff)
downloadlibguestfs-096f341714ee7d1575c93d437a8085821aa88d23.tar.gz
libguestfs-096f341714ee7d1575c93d437a8085821aa88d23.tar.xz
libguestfs-096f341714ee7d1575c93d437a8085821aa88d23.zip
Don't need to include XDR headers in <guestfs.h>.
Include the XDR headers in the internal guestfs-internal.h instead. This is knock-on effects to several other source files which were implicitly relying on indirectly loaded headers.
-rw-r--r--fish/copy.c1
-rw-r--r--fish/progress.c1
-rw-r--r--fish/time.c1
-rw-r--r--generator/generator_c.ml3
-rw-r--r--generator/generator_fish.ml2
-rw-r--r--src/guestfs-internal.h3
6 files changed, 9 insertions, 2 deletions
diff --git a/fish/copy.c b/fish/copy.c
index f5edad11..9f3f3df6 100644
--- a/fish/copy.c
+++ b/fish/copy.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
diff --git a/fish/progress.c b/fish/progress.c
index f1967866..27dfbece 100644
--- a/fish/progress.c
+++ b/fish/progress.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <inttypes.h>
#include <math.h>
+#include <sys/time.h>
#include <guestfs.h>
diff --git a/fish/time.c b/fish/time.c
index 48cf1002..931403f2 100644
--- a/fish/time.c
+++ b/fish/time.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <sys/time.h>
#include "fish.h"
diff --git a/generator/generator_c.ml b/generator/generator_c.ml
index caf73c3d..0194e0cb 100644
--- a/generator/generator_c.ml
+++ b/generator/generator_c.ml
@@ -360,10 +360,9 @@ and generate_guestfs_h () =
extern \"C\" {
#endif
+#include <stddef.h>
#include <stdint.h>
#include <stdarg.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
/* The handle. */
#ifndef GUESTFS_TYPEDEF_H
diff --git a/generator/generator_fish.ml b/generator/generator_fish.ml
index f59c520a..0c81dfcd 100644
--- a/generator/generator_fish.ml
+++ b/generator/generator_fish.ml
@@ -909,6 +909,8 @@ and generate_fish_prep_options_c () =
generate_header CStyle GPLv2plus;
pr "\
+#include <stdio.h>
+
#include \"fish.h\"
#include \"prepopts.h\"
diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h
index f8b3e94d..6dbbeecb 100644
--- a/src/guestfs-internal.h
+++ b/src/guestfs-internal.h
@@ -19,6 +19,9 @@
#ifndef GUESTFS_INTERNAL_H_
#define GUESTFS_INTERNAL_H_
+#include <rpc/types.h>
+#include <rpc/xdr.h>
+
#ifdef HAVE_PCRE
#include <pcre.h>
#endif