mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-21 21:25:25 +00:00
examples: Define _GNU_SOURCE for more examples
Some of our examples use GNU/Linux extensions functions/variables: 1) domtop.c uses usleep(3), 2) logging.c uses getopt(3). Put _GNU_SOURCE definition at the top of corresponding files so that users can just grab the code and compile it (in contrast with the rest of the code where _GNU_SOURCE is declared in meson-config.h). Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
ce41108ecc
commit
9ef6541cec
@ -1,3 +1,4 @@
|
|||||||
|
#define _GNU_SOURCE
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
* <http://www.gnu.org/licenses/>.
|
* <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define _GNU_SOURCE
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <libvirt/libvirt.h>
|
#include <libvirt/libvirt.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user