[PATCH 2/2] examples: include config.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since gnulib commit 6954995d unistd.h is included via stdlib.h
on BSD systems, which requires config.h to be included first.

Add config.h to the files that use it.

Part of this commit reverts commit 6ee918de7462a20947241ec817c4571d6b84a716

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 examples/admin/client_close.c        | 2 ++
 examples/admin/client_info.c         | 3 ++-
 examples/admin/client_limits.c       | 2 ++
 examples/admin/list_clients.c        | 2 ++
 examples/admin/list_servers.c        | 2 ++
 examples/admin/logging.c             | 3 ++-
 examples/admin/threadpool_params.c   | 2 ++
 examples/dommigrate/dommigrate.c     | 2 ++
 examples/hellolibvirt/hellolibvirt.c | 2 ++
 examples/openauth/openauth.c         | 2 ++
 examples/rename/rename.c             | 2 ++
 11 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/examples/admin/client_close.c b/examples/admin/client_close.c
index 5c28ce7949..9b7e1febb1 100644
--- a/examples/admin/client_close.c
+++ b/examples/admin/client_close.c
@@ -1,3 +1,5 @@
+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <libvirt/libvirt.h>
diff --git a/examples/admin/client_info.c b/examples/admin/client_info.c
index 2c46ccf514..550a24824a 100644
--- a/examples/admin/client_info.c
+++ b/examples/admin/client_info.c
@@ -1,4 +1,5 @@
-#define _GNU_SOURCE
+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>
diff --git a/examples/admin/client_limits.c b/examples/admin/client_limits.c
index 69b931682c..a87cb52c82 100644
--- a/examples/admin/client_limits.c
+++ b/examples/admin/client_limits.c
@@ -1,3 +1,5 @@
+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <libvirt/libvirt-admin.h>
diff --git a/examples/admin/list_clients.c b/examples/admin/list_clients.c
index 15205a7bd1..1d961a1ec9 100644
--- a/examples/admin/list_clients.c
+++ b/examples/admin/list_clients.c
@@ -1,3 +1,5 @@
+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>
diff --git a/examples/admin/list_servers.c b/examples/admin/list_servers.c
index e53cd3b48f..d48d87af6e 100644
--- a/examples/admin/list_servers.c
+++ b/examples/admin/list_servers.c
@@ -1,3 +1,5 @@
+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <libvirt/libvirt-admin.h>
diff --git a/examples/admin/logging.c b/examples/admin/logging.c
index dc1b23aab5..10952afa03 100644
--- a/examples/admin/logging.c
+++ b/examples/admin/logging.c
@@ -1,8 +1,9 @@
+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdbool.h>
 
-#include "config.h"
 #include <unistd.h>
 #include <libvirt/libvirt-admin.h>
 #include <libvirt/virterror.h>
diff --git a/examples/admin/threadpool_params.c b/examples/admin/threadpool_params.c
index be833c2ea3..9517dcb0f2 100644
--- a/examples/admin/threadpool_params.c
+++ b/examples/admin/threadpool_params.c
@@ -1,3 +1,5 @@
+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <libvirt/libvirt-admin.h>
diff --git a/examples/dommigrate/dommigrate.c b/examples/dommigrate/dommigrate.c
index 1b6072d138..71a0af4058 100644
--- a/examples/dommigrate/dommigrate.c
+++ b/examples/dommigrate/dommigrate.c
@@ -20,6 +20,8 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <libvirt/libvirt.h>
diff --git a/examples/hellolibvirt/hellolibvirt.c b/examples/hellolibvirt/hellolibvirt.c
index bfb12846e6..02c4401987 100644
--- a/examples/hellolibvirt/hellolibvirt.c
+++ b/examples/hellolibvirt/hellolibvirt.c
@@ -2,6 +2,8 @@
  * hypervisor and gather a few bits of information about domains.
  * Similar API's exist for storage pools, networks, and interfaces. */
 
+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <libvirt/libvirt.h>
diff --git a/examples/openauth/openauth.c b/examples/openauth/openauth.c
index efd21c374f..eef46d5f52 100644
--- a/examples/openauth/openauth.c
+++ b/examples/openauth/openauth.c
@@ -1,6 +1,8 @@
 /* This is a copy of the hellolibvirt example demonstaring how to use
  * virConnectOpenAuth with a custom auth callback */
 
+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/examples/rename/rename.c b/examples/rename/rename.c
index 85f18e9df3..c64dd5baa3 100644
--- a/examples/rename/rename.c
+++ b/examples/rename/rename.c
@@ -16,6 +16,8 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <libvirt/libvirt.h>
-- 
2.16.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux