[CRIU] [V2,5/6] Android NDK: necessary Makefile changes

Dmitry Safonov 0x7f454c46 at gmail.com
Wed Apr 3 18:45:39 MSK 2019


Hi Zhang,

On 4/3/19 3:17 AM, Zhang, Ning A wrote:
> Hi, Dmitry
> 
>     I have read your reviews on my patches, thank you, but only receive
> review letter for patch 3,4. and I see your review comments. So start a
> new email thread to discuss: https://patchwork.criu.org/patch/10373/

Yeah, I got replies from gmail delivery system with:

  Final-Recipient: rfc822; ning.a.zhang at intel.com
  Action: failed
  Status: 5.0.0
  Remote-MTA: dns; mga04.intel.com. (the server for the domain
  intel.com.)
  Diagnostic-Code: smtp; 550 Too many invalid recipients

Not quite sure what's happened with the delivery of emails.

> you said:
> 
>     I wonder if it's just one function, can we rather add an extern
>     declaration
>     for it? I think, removing the warnings is a bit too big hammer here.
>     In my point of view, the flag is valuable as it results in cleaner
>     includes
>     and also provides warning on compile-time rather than an error on
>     linking.
> 
> Not just one single function, they are aio*, fanotify_init,
> fanotify_mark, pivot_root, and index. Android NDK also doesn' have
> aio.h, fanotify.h. (CRIU has pivot_root function declaration in
> mount.h). we can create new aio.h, fanotify.h and related functions
> implements as new external dependents. but for index function, it
> should be in strings.h, Android NDK has this header file, but it
> doesn't define this fucntion.

I think what we can do is adding a new header file, something like:
include/common/android-externs.h
(maybe some other name)

So, we can put all the needed externs, those are not present in Android
NDK headers. Than we can include the header in Makefile with something
like CFLAGS+="-include android-externs.h".

In the perfect world we would also add a compile-time feature into
scripts/feature-tests.mak to detect compilation with NDK and add the
cflag only for Android compilation, but do not include the header on
other Linux's.

+CC:
Cyrill, what do you think? Maybe a better proposal in your mind?

> one suggestion is follow pivot_root in CRIU, add index function
> declaration in criu/config.c, do you agree?
> 
> Or I can update my build_criu.sh, so no need to change CRIU source
> code.

Thanks,
          Dmitry


More information about the CRIU mailing list