[CRIU] [PATCH] Move headers around to fix issues on custom-built glibc

Dmitry Safonov dsafonov at virtuozzo.com
Tue Aug 16 09:09:55 PDT 2016


On 08/16/2016 06:52 PM, Dmitry Safonov wrote:
> Hi,
>
> On 08/16/2016 06:13 PM, Nikolay Borisov wrote:
>> diff --git a/criu/arch/x86/crtools.c b/criu/arch/x86/crtools.c
>> index 51eab133f269..54ccf8465f7f 100644
>> --- a/criu/arch/x86/crtools.c
>> +++ b/criu/arch/x86/crtools.c
>> @@ -11,9 +11,9 @@
>>
>>  #include "cr_options.h"
>>  #include "compiler.h"
>> +#include "restorer.h"
>>  #include "ptrace.h"
>>  #include "parasite-syscall.h"
>> -#include "restorer.h"
>>  #include "log.h"
>>  #include "util.h"
>>  #include "cpu.h"
>>
>
> Hmm, from my POV, one should avoid hard include seq-dependencies as
> much as possible.
> As F_{S,G}ETPIPE_SZ are defined both in fcntl.h and config-base.h,
> can we do something like that? Am I missing something?
>

I replaced system includes with a wrapper only for users of
F_{S,G}ETPIPE_SZ -- maybe we should even convert *all* includes of
system header to wrapper?
It would be a noisy patch, but for a long perspective it may come
as a better solution than manually checking order of includes.

-- 
              Dmitry


More information about the CRIU mailing list