]> xenbits.xensource.com Git - people/jgross/xen.git/commitdiff
tools/libxenstat: ensure strnlen() declaration is visible
authorJan Beulich <jbeulich@suse.com>
Thu, 14 Jan 2021 12:03:01 +0000 (13:03 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 14 Jan 2021 12:03:01 +0000 (13:03 +0100)
Its guard was updated such that it is visible by default when POSIX 2008
was adopted by glibc. It's not visible by default on older glibc.

Fixes: 40fe714ca424 ("tools/libs/stat: use memcpy instead of strncpy in getBridge")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libs/stat/xenstat_linux.c

index e0d242e1bc4290857fdb39647d94889c7ea09a43..c00b26d4d8980f26ccb96ccb57e3e5df2ef6ed9b 100644 (file)
@@ -20,6 +20,7 @@
  * Use is subject to license terms.
  */
 
+#define _GNU_SOURCE
 #include <fcntl.h>
 #include <dirent.h>
 #include <sys/types.h>