diff mbox series

[01/17] ppc64: Fix <sys/user.h> include order

Message ID 20240511115400.7587-2-richard.henderson@linaro.org
State New
Headers show
Series RISU misc updates | expand

Commit Message

Richard Henderson May 11, 2024, 11:53 a.m. UTC
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 risu_ppc64.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Philippe Mathieu-Daudé May 15, 2024, 1:11 p.m. UTC | #1
Hi Richard,

On 11/5/24 13:53, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   risu_ppc64.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/risu_ppc64.c b/risu_ppc64.c
> index 9df8d58..62cf6aa 100644
> --- a/risu_ppc64.c
> +++ b/risu_ppc64.c
> @@ -11,9 +11,8 @@
>    *     based on Peter Maydell's risu_arm.c
>    *****************************************************************************/
>   
> -#include <sys/user.h>
> -
>   #include "risu.h"
> +#include <sys/user.h>

What is fixed exactly?
Richard Henderson May 15, 2024, 1:53 p.m. UTC | #2
On 5/15/24 15:11, Philippe Mathieu-Daudé wrote:
> Hi Richard,
> 
> On 11/5/24 13:53, Richard Henderson wrote:
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>>   risu_ppc64.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/risu_ppc64.c b/risu_ppc64.c
>> index 9df8d58..62cf6aa 100644
>> --- a/risu_ppc64.c
>> +++ b/risu_ppc64.c
>> @@ -11,9 +11,8 @@
>>    *     based on Peter Maydell's risu_arm.c
>>    *****************************************************************************/
>> -#include <sys/user.h>
>> -
>>   #include "risu.h"
>> +#include <sys/user.h>
> 
> What is fixed exactly?

I don't remember (patch dated in 2022).
It is probably a #define namespace issue with cfarm hosts running Centos 7.9?
I suppose I should investigate, and drop it if irrelevant.


r~
Philippe Mathieu-Daudé May 15, 2024, 4:55 p.m. UTC | #3
On 15/5/24 15:53, Richard Henderson wrote:
> On 5/15/24 15:11, Philippe Mathieu-Daudé wrote:
>> Hi Richard,
>>
>> On 11/5/24 13:53, Richard Henderson wrote:
>>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>>> ---
>>>   risu_ppc64.c | 3 +--
>>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/risu_ppc64.c b/risu_ppc64.c
>>> index 9df8d58..62cf6aa 100644
>>> --- a/risu_ppc64.c
>>> +++ b/risu_ppc64.c
>>> @@ -11,9 +11,8 @@
>>>    *     based on Peter Maydell's risu_arm.c
>>>    
>>> *****************************************************************************/
>>> -#include <sys/user.h>
>>> -
>>>   #include "risu.h"
>>> +#include <sys/user.h>
>>
>> What is fixed exactly?
> 
> I don't remember (patch dated in 2022).
> It is probably a #define namespace issue with cfarm hosts running Centos 
> 7.9?
> I suppose I should investigate, and drop it if irrelevant.

It was just out of curiosity (I had a quick look at the headers
and couldn't see anything obvious, and other headers also include
system headers before "risu.h").

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Richard Henderson May 16, 2024, 1:32 p.m. UTC | #4
On 5/15/24 18:55, Philippe Mathieu-Daudé wrote:
> On 15/5/24 15:53, Richard Henderson wrote:
>> On 5/15/24 15:11, Philippe Mathieu-Daudé wrote:
>>> Hi Richard,
>>>
>>> On 11/5/24 13:53, Richard Henderson wrote:
>>>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>>>> ---
>>>>   risu_ppc64.c | 3 +--
>>>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>>>
>>>> diff --git a/risu_ppc64.c b/risu_ppc64.c
>>>> index 9df8d58..62cf6aa 100644
>>>> --- a/risu_ppc64.c
>>>> +++ b/risu_ppc64.c
>>>> @@ -11,9 +11,8 @@
>>>>    *     based on Peter Maydell's risu_arm.c
>>>> *****************************************************************************/
>>>> -#include <sys/user.h>
>>>> -
>>>>   #include "risu.h"
>>>> +#include <sys/user.h>
>>>
>>> What is fixed exactly?
>>
>> I don't remember (patch dated in 2022).
>> It is probably a #define namespace issue with cfarm hosts running Centos 7.9?
>> I suppose I should investigate, and drop it if irrelevant.
> 
> It was just out of curiosity (I had a quick look at the headers
> and couldn't see anything obvious, and other headers also include
> system headers before "risu.h").

Root cause: <sys/user.h> is not self-contained on centos 7.7:

In file included from risu_ppc64.c:14:
/usr/include/sys/user.h:27:9: error: unknown type name ‘size_t’
    27 |         size_t          u_tsize;                /* text size (pages) */
       |         ^~~~~~

I'll update the commit message.


r~
diff mbox series

Patch

diff --git a/risu_ppc64.c b/risu_ppc64.c
index 9df8d58..62cf6aa 100644
--- a/risu_ppc64.c
+++ b/risu_ppc64.c
@@ -11,9 +11,8 @@ 
  *     based on Peter Maydell's risu_arm.c
  *****************************************************************************/
 
-#include <sys/user.h>
-
 #include "risu.h"
+#include <sys/user.h>
 
 void advance_pc(void *vuc)
 {