examples: include config.h

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 6ee918de74

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
Ján Tomko 2019-01-04 16:16:13 +01:00
parent 31903c4a5d
commit b6f7825992
11 changed files with 22 additions and 2 deletions

View File

@ -1,3 +1,5 @@
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <libvirt/libvirt.h>

View File

@ -1,4 +1,5 @@
#define _GNU_SOURCE
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

View File

@ -1,3 +1,5 @@
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <libvirt/libvirt-admin.h>

View File

@ -1,3 +1,5 @@
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

View File

@ -1,3 +1,5 @@
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <libvirt/libvirt-admin.h>

View File

@ -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>

View File

@ -1,3 +1,5 @@
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <libvirt/libvirt-admin.h>

View File

@ -20,6 +20,8 @@
* <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <libvirt/libvirt.h>

View File

@ -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>

View File

@ -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>

View File

@ -16,6 +16,8 @@
* <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <libvirt/libvirt.h>