Skip to contentSkip to conversation

tools/libxenstat: ensure strnlen() declaration is visible

PATCH In review Jan Beulich 2 participants 2 messages Jan 11, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
tools/libs/stat/xenstat_linux.c +1 -0
@@ -20,6 +20,7 @@
  * Use is subject to license terms.
  */
 
+#define _GNU_SOURCE
 #include <fcntl.h>
 #include <dirent.h>
 #include <sys/types.h>
Reviewed-by on v1 1/1
#1 lore raw

Jan Beulich writes ("[PATCH] tools/libxenstat: ensure strnlen() declaration is visible"):

Quoted 5 lines

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")