]> git.ipfire.org Git - thirdparty/libvirt.git/commit
examples: Define _GNU_SOURCE for more examples
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 7 Feb 2024 12:28:15 +0000 (13:28 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 7 Feb 2024 17:01:03 +0000 (18:01 +0100)
commit9ef6541cecde4ebc16bcfc9c5860006f0d8fb2a9
tree97ec7f2787b2aa68b6e5f705dbd8d1a67a77e2da
parentce41108eccd7688dd19cd4c2ba7fc2aa0080b2ad
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>
examples/c/admin/logging.c
examples/c/domain/domtop.c