oslib-posix: check for posix_memalign in configure script
commit9bc5a7193fb422ee53187601eba577ee5d195522
authorAndreas Gustafsson <gson@gson.org>
Thu, 4 Jan 2018 17:39:36 +0000 (4 19:39 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 10 Feb 2018 07:21:50 +0000 (10 10:21 +0300)
tree0511b1f31ac63a664f67c850aba70c8f031351f8
parenta348f64d4652d68212886019ca74825aa1667969
oslib-posix: check for posix_memalign in configure script

Check for the presence of posix_memalign() in the configure script,
not using "defined(_POSIX_C_SOURCE) && !defined(__sun__)".  This
lets qemu use posix_memalign() on NetBSD versions that have it,
instead of falling back to valloc() which is wasteful when the
required alignment is smaller than a page.

Signed-off-by: Andreas Gustafsson <gson@gson.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Kamil Rytarowski <n54@gmx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
configure
util/oslib-posix.c