]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: check string.h not strings.h for explicit_bzero
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 19 Apr 2017 20:14:16 +0000 (16:14 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 24 Apr 2017 01:47:29 +0000 (21:47 -0400)
I used strings.h because that's what explicit_bzero(3) says. But glibc defines
it in string.h. There are no other available implementations atm (musl does not
define it, bionic aliases it to memset in openbsd-compat.h, yikes). We also
include just string.h from the code. So just look for the function in string.h,
and if it ever appears in other places, we can change the detection and includes.

meson.build

index 65cb3889fda92f4e229aaa73c455610dfaaf62ea..52ef13dee778d4c9d120d7d3216ac147126c75ac 100644 (file)
@@ -388,7 +388,7 @@ foreach ident : [
                                  #include <keyutils.h>'''],
         ['copy_file_range',   '''#include <sys/syscall.h>
                                  #include <unistd.h>'''],
-        ['explicit_bzero' ,   '''#include <strings.h>'''],
+        ['explicit_bzero' ,   '''#include <string.h>'''],
 ]
 
         have = cc.has_function(ident[0], prefix : ident[1])