qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] util: fix to get configuration macros in util/mmap-alloc.c


From: Liu, Jingqi
Subject: Re: [PATCH] util: fix to get configuration macros in util/mmap-alloc.c
Date: Fri, 6 Mar 2020 10:48:34 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 3/6/2020 12:10 AM, Ján Tomko wrote:
On a Thursday in 2020, Jingqi Liu wrote:
The CONFIG_LINUX symbol is always not defined in this file.
This fixes that "config-host.h" header file is not included
for getting macros.

Signed-off-by: Jingqi Liu <address@hidden>
---
util/mmap-alloc.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c
index 27dcccd8ec..24c0e380f3 100644
--- a/util/mmap-alloc.c
+++ b/util/mmap-alloc.c
@@ -10,6 +10,8 @@
 * later.  See the COPYING file in the top-level directory.
 */

+#include "config-host.h"
+

According to CODING_STYLE.rst, qemu/osdep.h is the header file
that should be included first, before all the other includes.

So the minimal fix would be moving qemu/osdep.h up here.

Thanks for your review.

I've tried to simply move "qemu/osdep.h" to the first line.

It caused many macros redefinition errors.


#ifdef CONFIG_LINUX
#include <linux/mman.h>
#else  /* !CONFIG_LINUX */


Introduced by commit 119906afa5ca610adb87c55ab0d8e53c9104bfc3

I've checked this commit.

Thanks,

Jingqi


Jano

--
2.17.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]