OpenBSD build (was: [PATCH v2] os-posix: Fix build on FreeBSD)
Am 16.04.2012 09:31, schrieb Gerd Hoffmann:
Quoted 2 lines
Don't have FreeBSD at hand. /me has a OpenBSD virtual machine for build tests where this code compiles without issues.
[snip]
I've now set up an OpenBSD 5.1 VM and it compiles okay. However the output is completely chatty due to redundant declarations in the OpenBSD system headers.
When I remove -Wredundant-decls from QEMU_CFLAGS it is much better.
Any suggestion how to properly fix this in configure? The QEMU_CFLAGS block is before the OS has been checked, and fwiw the flag has been around since 2008 (e0e36fe91d2eadcec8159eb6d728c9dd7fc6cf44 / r5931).
Regards,
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 9 lines · Andreas Färber
Am 16.04.2012 09:31, schrieb Gerd Hoffmann:
Quoted 2 lines
Don't have FreeBSD at hand. /me has a OpenBSD virtual machine for build tests where this code compiles without issues.
[snip]
I've now set up an OpenBSD 5.1 VM and it compiles okay. However the output is completely chatty due to redundant declarations in the OpenBSD system headers.
Quoted 5 lines
When I remove -Wredundant-decls from
QEMU_CFLAGSit is much better.Any suggestion how to properly fix this in configure? The
QEMU_CFLAGSblock is before the OS has been checked, and fwiw the flag has been around since 2008 (e0e36fe91d2eadcec8159eb6d728c9dd7fc6cf44/ r5931).
Can we have a check whether system headers produce warnings, something like this:
$ cat headers.c #include <sys/types.h> #include <unistd.h> $ gcc -Wredundant-decls -c headers.c In file included from headers.c:2: /usr/include/unistd.h:100: warning: redundant redeclaration of 'lseek' /usr/include/sys/types.h:210: warning: previous declaration of 'lseek' was here /usr/include/unistd.h:139: warning: redundant redeclaration of 'ftruncate' /usr/include/sys/types.h:211: warning: previous declaration of 'ftruncate' was here /usr/include/unistd.h:164: warning: redundant redeclaration of 'truncate' /usr/include/sys/types.h:212: warning: previous declaration of 'truncate' was here
Quoted 7 lines
Regards,
Andreas--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg