Commit 3990d09adf4463eca200ad964cc55643c33feb50
1 parent
4dd8c138
sys-queue.h defines _SYS_QUEUE_H_ which is also defined by
the <sys/queue.h> system header. <sys/disk.h> uses SLIST_ENTRY on NetBSD, which doesn't exist in sys-queue.h. Therefore, include <sys/queue.h> before including sys-queue.h. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5885 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
6 additions
and
1 deletions
block.c
... | ... | @@ -21,6 +21,12 @@ |
21 | 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
22 | 22 | * THE SOFTWARE. |
23 | 23 | */ |
24 | +#include "config-host.h" | |
25 | +#ifdef _BSD | |
26 | +/* include native header before sys-queue.h */ | |
27 | +#include <sys/queue.h> | |
28 | +#endif | |
29 | + | |
24 | 30 | #include "qemu-common.h" |
25 | 31 | #include "console.h" |
26 | 32 | #include "block_int.h" |
... | ... | @@ -29,7 +35,6 @@ |
29 | 35 | #include <sys/types.h> |
30 | 36 | #include <sys/stat.h> |
31 | 37 | #include <sys/ioctl.h> |
32 | -#include <sys/queue.h> | |
33 | 38 | #include <sys/disk.h> |
34 | 39 | #endif |
35 | 40 | ... | ... |