diff mbox series

libs/foreignmemory: fix MiniOS build

Message ID 20210129080905.14517-1-roger.pau@citrix.com (mailing list archive)
State New
Headers show
Series libs/foreignmemory: fix MiniOS build | expand

Commit Message

Roger Pau Monné Jan. 29, 2021, 8:09 a.m. UTC
Keep the dummy handlers for restrict, map_resource and unmap_resource
for MiniOS, or else the build breaks with:

ld: /home/osstest/build.158759.build-amd64/xen/stubdom/mini-os-x86_64-xenstore/mini-os.o: in function `xenforeignmemory_restrict':
/home/osstest/build.158759.build-amd64/xen/stubdom/libs-x86_64/foreignmemory/core.c:137: undefined reference to `osdep_xenforeignmemory_restrict'
ld: /home/osstest/build.158759.build-amd64/xen/stubdom/mini-os-x86_64-xenstore/mini-os.o: in function `xenforeignmemory_map_resource':
/home/osstest/build.158759.build-amd64/xen/stubdom/libs-x86_64/foreignmemory/core.c:171: undefined reference to `osdep_xenforeignmemory_map_resource'
ld: /home/osstest/build.158759.build-amd64/xen/stubdom/mini-os-x86_64-xenstore/mini-os.o: in function `xenforeignmemory_unmap_resource':
/home/osstest/build.158759.build-amd64/xen/stubdom/libs-x86_64/foreignmemory/core.c:185: undefined reference to `osdep_xenforeignmemory_unmap_resource'
ld: /home/osstest/build.158759.build-amd64/xen/stubdom/mini-os-x86_64-xenstore/mini-os.o: in function `xenforeignmemory_resource_size':
/home/osstest/build.158759.build-amd64/xen/stubdom/libs-x86_64/foreignmemory/core.c:200: undefined reference to `osdep_xenforeignmemory_map_resource'

Fixes: 2b4b33ffe7d67 ('libs/foreignmemory: Implement on NetBSD')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 tools/libs/foreignmemory/private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Cooper Jan. 29, 2021, 8:11 a.m. UTC | #1
On 29/01/2021 08:09, Roger Pau Monne wrote:
> Keep the dummy handlers for restrict, map_resource and unmap_resource
> for MiniOS, or else the build breaks with:
>
> ld: /home/osstest/build.158759.build-amd64/xen/stubdom/mini-os-x86_64-xenstore/mini-os.o: in function `xenforeignmemory_restrict':
> /home/osstest/build.158759.build-amd64/xen/stubdom/libs-x86_64/foreignmemory/core.c:137: undefined reference to `osdep_xenforeignmemory_restrict'
> ld: /home/osstest/build.158759.build-amd64/xen/stubdom/mini-os-x86_64-xenstore/mini-os.o: in function `xenforeignmemory_map_resource':
> /home/osstest/build.158759.build-amd64/xen/stubdom/libs-x86_64/foreignmemory/core.c:171: undefined reference to `osdep_xenforeignmemory_map_resource'
> ld: /home/osstest/build.158759.build-amd64/xen/stubdom/mini-os-x86_64-xenstore/mini-os.o: in function `xenforeignmemory_unmap_resource':
> /home/osstest/build.158759.build-amd64/xen/stubdom/libs-x86_64/foreignmemory/core.c:185: undefined reference to `osdep_xenforeignmemory_unmap_resource'
> ld: /home/osstest/build.158759.build-amd64/xen/stubdom/mini-os-x86_64-xenstore/mini-os.o: in function `xenforeignmemory_resource_size':
> /home/osstest/build.158759.build-amd64/xen/stubdom/libs-x86_64/foreignmemory/core.c:200: undefined reference to `osdep_xenforeignmemory_map_resource'
>
> Fixes: 2b4b33ffe7d67 ('libs/foreignmemory: Implement on NetBSD')
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks for getting to this.  I hadn't had time thus far.

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> and I'll put it in
straight away to unblock things.
diff mbox series

Patch

diff --git a/tools/libs/foreignmemory/private.h b/tools/libs/foreignmemory/private.h
index 7e734ac61e..1ee3626dd2 100644
--- a/tools/libs/foreignmemory/private.h
+++ b/tools/libs/foreignmemory/private.h
@@ -54,7 +54,7 @@  struct xenforeignmemory_resource_handle {
     int flags;
 };
 
-#ifdef __sun__
+#if defined(__sun__) || defined(__MINIOS__)
 static inline int osdep_xenforeignmemory_restrict(xenforeignmemory_handle *fmem,
                                                   domid_t domid)
 {