Fix compilation when UFFDIO_REGISTER is not set.
PATCH 1/1 Fix compilation when UFFDIO_REGISTER is not set.
--- subprojects/libvhost-user/libvhost-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
subprojects/libvhost-user/libvhost-user.c +1 -1
@@ -629,9 +629,9 @@ static bool generate_faults(VuDev *dev) {unsigned int i;for (i =0 ; i < dev->nregions; i++) { +#ifdef UFFDIO_REGISTER VuDevRegion *dev_region = &dev->regions[i];int ret; -#ifdef UFFDIO_REGISTER struct uffdio_register reg_struct;/*
Signature · 1 line
2.42.0.515.g380fc7ccd1-goog
Michael Tokarev
AppliedQuoted 4 lines · Pierre Labatut
Signed-off-by Pierre Labatut <[email protected]>--- subprojects/libvhost-user/libvhost-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
I'm not sure how subprojects are handled here. Should we commit things to a subproject directly? This one does not seem to be wrapped at least, and has been in contrib/ before moving to subprojects/, so seems to be ok.
Quoted 5 lines
subprojects/libvhost-user/libvhost-user.c +0
-0
subprojects/libvhost-user/libvhost-user.c static bool · line 637
Quoted 10 lines
subprojects/libvhost-user/libvhost-user.c +1
-1@@ -629,9 +629,9 @@ static bool generate_faults(VuDev *dev) {unsigned int i;for (i =0 ; i < dev->nregions; i++) { +#ifdef UFFDIO_REGISTER VuDevRegion *dev_region = &dev->regions[i];int ret; -#ifdef UFFDIO_REGISTER struct uffdio_register reg_struct;/*
Applied to my trivial-patches tree, thank you!
/mjt
Quoted 10 lines · Michael Tokarev
Quoted 4 lines · Pierre Labatut
Signed-off-by Pierre Labatut <[email protected]>---
subprojects/libvhost-user/libvhost-user.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)I'm not sure how subprojects are handled here. Should we commit things to a subproject directly? This one does not seem to be wrapped at least, and has been in contrib/ before moving to subprojects/, so seems to be ok.
Yes, subprojects either are hosted directly in qemu.git (they're just a nested build system), or they replace a submodule and have a .wrap file (and then the patch won't apply). libvhost-user is of the former kind.
Paolo