Don't include <libintl.h> (for gettext etc) in <guestfs-internal.h>.
Include include it only in files that use internationalized strings.
---
src/appliance.c | 1 +
src/conn-socket.c | 1 +
src/copy-in-out.c | 1 +
src/create.c | 1 +
src/dbdump.c | 1 +
src/drives.c | 1 +
src/errors.c | 1 +
src/filearch.c | 1 +
src/fuse.c | 1 +
src/guestfs-internal.h | 2 --
src/handle.c | 1 +
src/info.c | 1 +
src/inspect-fs-unix.c | 1 +
src/inspect-fs.c | 1 +
src/inspect.c | 1 +
src/launch-direct.c | 1 +
src/launch-libvirt.c | 1 +
src/launch-uml.c | 1 +
src/launch-unix.c | 1 +
src/launch.c | 1 +
src/libvirt-auth.c | 1 +
src/libvirt-domain.c | 1 +
src/osinfo.c | 1 +
src/proto.c | 1 +
src/tmpdirs.c | 1 +
src/whole-file.c | 1 +
26 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/src/appliance.c b/src/appliance.c
index 2645cca..793190a 100644
--- a/src/appliance.c
+++ b/src/appliance.c
@@ -31,6 +31,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <utime.h>
+#include <libintl.h>
#include "glthread/lock.h"
#include "ignore-value.h"
diff --git a/src/conn-socket.c b/src/conn-socket.c
index 3ead48f..eb22b0c 100644
--- a/src/conn-socket.c
+++ b/src/conn-socket.c
@@ -31,6 +31,7 @@
#include <sys/socket.h>
#include <sys/types.h>
#include <assert.h>
+#include <libintl.h>
#include "guestfs.h"
#include "guestfs-internal.h"
diff --git a/src/copy-in-out.c b/src/copy-in-out.c
index d5e7fb0..e3697c0 100644
--- a/src/copy-in-out.c
+++ b/src/copy-in-out.c
@@ -28,6 +28,7 @@
#include <sys/wait.h>
#include <errno.h>
#include <string.h>
+#include <libintl.h>
#include "guestfs.h"
#include "guestfs-internal.h"
diff --git a/src/create.c b/src/create.c
index e9bac95..d80939c 100644
--- a/src/create.c
+++ b/src/create.c
@@ -30,6 +30,7 @@
#include <sys/ioctl.h>
#include <errno.h>
#include <string.h>
+#include <libintl.h>
#ifdef HAVE_LINUX_FS_H
#include <linux/fs.h>
diff --git a/src/dbdump.c b/src/dbdump.c
index 13d4a97..db0f433 100644
--- a/src/dbdump.c
+++ b/src/dbdump.c
@@ -28,6 +28,7 @@
#include <sys/stat.h>
#include <errno.h>
#include <sys/wait.h>
+#include <libintl.h>
#ifdef HAVE_ENDIAN_H
#include <endian.h>
diff --git a/src/drives.c b/src/drives.c
index ad747ab..dd508f1 100644
--- a/src/drives.c
+++ b/src/drives.c
@@ -34,6 +34,7 @@
#include <arpa/inet.h>
#include <assert.h>
#include <sys/types.h>
+#include <libintl.h>
#include <pcre.h>
diff --git a/src/errors.c b/src/errors.c
index 2d3ae84..c259884 100644
--- a/src/errors.c
+++ b/src/errors.c
@@ -23,6 +23,7 @@
#include <stdarg.h>
#include <string.h>
#include <errno.h>
+#include <libintl.h>
#include "c-ctype.h"
diff --git a/src/filearch.c b/src/filearch.c
index 29c9ba6..7b63719 100644
--- a/src/filearch.c
+++ b/src/filearch.c
@@ -26,6 +26,7 @@
#include <string.h>
#include <sys/stat.h>
#include <sys/wait.h>
+#include <libintl.h>
#include <pcre.h>
diff --git a/src/fuse.c b/src/fuse.c
index 332c1be..9fb84ae 100644
--- a/src/fuse.c
+++ b/src/fuse.c
@@ -25,6 +25,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <string.h>
+#include <libintl.h>
#if HAVE_FUSE
/* See <attr/xattr.h> */
diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h
index 9c7175f..5776a6e 100644
--- a/src/guestfs-internal.h
+++ b/src/guestfs-internal.h
@@ -21,8 +21,6 @@
#include <stdbool.h>
-#include <libintl.h>
-
#include <rpc/types.h>
#include <rpc/xdr.h>
diff --git a/src/handle.c b/src/handle.c
index 1bfb9ae..da196d5 100644
--- a/src/handle.c
+++ b/src/handle.c
@@ -23,6 +23,7 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
+#include <libintl.h>
#ifdef HAVE_LIBVIRT
#include <libvirt/libvirt.h>
diff --git a/src/info.c b/src/info.c
index bfd7860..de19202 100644
--- a/src/info.c
+++ b/src/info.c
@@ -30,6 +30,7 @@
#include <sys/wait.h>
#include <assert.h>
#include <string.h>
+#include <libintl.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c
index f2e1d9f..f8e778f 100644
--- a/src/inspect-fs-unix.c
+++ b/src/inspect-fs-unix.c
@@ -27,6 +27,7 @@
#include <string.h>
#include <sys/stat.h>
#include <errno.h>
+#include <libintl.h>
#ifdef HAVE_ENDIAN_H
#include <endian.h>
diff --git a/src/inspect-fs.c b/src/inspect-fs.c
index b6f03ee..d2be5c3 100644
--- a/src/inspect-fs.c
+++ b/src/inspect-fs.c
@@ -27,6 +27,7 @@
#include <string.h>
#include <sys/stat.h>
#include <errno.h>
+#include <libintl.h>
#ifdef HAVE_ENDIAN_H
#include <endian.h>
diff --git a/src/inspect.c b/src/inspect.c
index 7c7ee0c..0cc3d9f 100644
--- a/src/inspect.c
+++ b/src/inspect.c
@@ -27,6 +27,7 @@
#include <string.h>
#include <sys/stat.h>
#include <errno.h>
+#include <libintl.h>
#ifdef HAVE_ENDIAN_H
#include <endian.h>
diff --git a/src/launch-direct.c b/src/launch-direct.c
index ea67ec9..a00b938 100644
--- a/src/launch-direct.c
+++ b/src/launch-direct.c
@@ -35,6 +35,7 @@
#include <grp.h>
#include <assert.h>
#include <string.h>
+#include <libintl.h>
#include <pcre.h>
diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
index d4c4c47..4a2becd 100644
--- a/src/launch-libvirt.c
+++ b/src/launch-libvirt.c
@@ -31,6 +31,7 @@
#include <sys/wait.h>
#include <assert.h>
#include <string.h>
+#include <libintl.h>
#ifdef HAVE_LIBVIRT
#include <libvirt/libvirt.h>
diff --git a/src/launch-uml.c b/src/launch-uml.c
index 785548c..c368f21 100644
--- a/src/launch-uml.c
+++ b/src/launch-uml.c
@@ -30,6 +30,7 @@
#include <sys/socket.h>
#include <sys/wait.h>
#include <sys/signal.h>
+#include <libintl.h>
#include "cloexec.h"
diff --git a/src/launch-unix.c b/src/launch-unix.c
index dae4389..1dac58e 100644
--- a/src/launch-unix.c
+++ b/src/launch-unix.c
@@ -25,6 +25,7 @@
#include <sys/socket.h>
#include <sys/un.h>
#include <string.h>
+#include <libintl.h>
#include "guestfs.h"
#include "guestfs-internal.h"
diff --git a/src/launch.c b/src/launch.c
index 343f4ea..a6a88f0 100644
--- a/src/launch.c
+++ b/src/launch.c
@@ -31,6 +31,7 @@
#include <sys/wait.h>
#include <errno.h>
#include <assert.h>
+#include <libintl.h>
#include "guestfs.h"
#include "guestfs-internal.h"
diff --git a/src/libvirt-auth.c b/src/libvirt-auth.c
index 98ac047..caf9951 100644
--- a/src/libvirt-auth.c
+++ b/src/libvirt-auth.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
+#include <libintl.h>
#ifdef HAVE_LIBVIRT
#include <libvirt/libvirt.h>
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 3a19306..c1d6c4c 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -23,6 +23,7 @@
#include <stdbool.h>
#include <assert.h>
#include <string.h>
+#include <libintl.h>
#ifdef HAVE_LIBVIRT
#include <libvirt/libvirt.h>
diff --git a/src/osinfo.c b/src/osinfo.c
index f7e1548..806e6de 100644
--- a/src/osinfo.c
+++ b/src/osinfo.c
@@ -55,6 +55,7 @@
#include <dirent.h>
#include <assert.h>
#include <sys/types.h>
+#include <libintl.h>
#include <libxml/parser.h>
#include <libxml/xpath.h>
diff --git a/src/proto.c b/src/proto.c
index 815a4d2..f8e8d39 100644
--- a/src/proto.c
+++ b/src/proto.c
@@ -33,6 +33,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <assert.h>
+#include <libintl.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
diff --git a/src/tmpdirs.c b/src/tmpdirs.c
index b1f1445..c2799c8 100644
--- a/src/tmpdirs.c
+++ b/src/tmpdirs.c
@@ -25,6 +25,7 @@
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <libintl.h>
#include "ignore-value.h"
diff --git a/src/whole-file.c b/src/whole-file.c
index 38050d9..2563db5 100644
--- a/src/whole-file.c
+++ b/src/whole-file.c
@@ -23,6 +23,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
+#include <libintl.h>
#include "guestfs.h"
#include "guestfs-internal.h"
--
2.5.0