[PATCH] tools/libxenstat: ensure strnlen() declaration is visible

Jan Beulich posted 1 patch 2 weeks, 2 days ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/ae0d2084-75d7-bcd9-33bc-54b846dd5681@suse.com

[PATCH] tools/libxenstat: ensure strnlen() declaration is visible

Posted by Jan Beulich 2 weeks, 2 days ago
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>

--- a/tools/libs/stat/xenstat_linux.c
+++ b/tools/libs/stat/xenstat_linux.c
@@ -20,6 +20,7 @@
  * Use is subject to license terms.
  */
 
+#define _GNU_SOURCE
 #include <fcntl.h>
 #include <dirent.h>
 #include <sys/types.h>

Re: [PATCH] tools/libxenstat: ensure strnlen() declaration is visible

Posted by Ian Jackson 2 weeks, 2 days ago
Jan Beulich writes ("[PATCH] tools/libxenstat: ensure strnlen() declaration is visible"):
> 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>