On 09/04/2018 11:20, Peter Maydell wrote:
> This fails to compile on OSX and the BSDs:
> /Users/pm215/src/qemu-for-merges/util/memfd.c:208:19: error: implicit
> declaration of function 'memfd_create' is invalid in C99
> [-Werror,-Wimplicit-function-declaration]
> int mfd = memfd_create("test", 0);
> ^
Will fix like this in v2:
diff --git a/util/memfd.c b/util/memfd.c
index 277f721..b3ecbac 100644
--- a/util/memfd.c
+++ b/util/memfd.c
@@ -202,6 +202,7 @@ bool qemu_memfd_alloc_check(void)
*/
bool qemu_memfd_check(void)
{
+#ifdef CONFIG_LINUX
static int memfd_check = MEMFD_TODO;
if (memfd_check == MEMFD_TODO) {
Stage this hunk [y,n,q,a,d,/,j,J,g,e,?]? y
@@ -215,4 +216,7 @@ bool qemu_memfd_check(void)
}
return memfd_check == MEMFD_OK;
+#else
+ return false;
+#endif
}
>
> I also got
> TEST: tests/boot-serial-test... (pid=15159)
> /sparc64/boot-serial/sun4u: **
> ERROR:/home/petmay01/linaro/qemu-for-merges/tests/boot-serial-test.c:139:check_guest_output:
> assertion failed: (output_ok)
> FAIL
>
> on an x86-64/linux host, but I have a feeling that's one of
> our intermittents rather than anything in this patch.