tools/misc/xencov.c: build failure on NetBSD
Hi,
tools/misc/xencov.c fails to build.
NetBSD does not have MAP_LOCKED.
Christoph
Quoted 8 lines · Christoph Egger <chegger <at> amazon.de> writes:
Hi,
tools/misc/xencov.cfails to build.
NetBSD does not haveMAP_LOCKED.Christoph
I wanted to test 4.3 on NetBSD but ended up with this problem too... In fact this happened before in other parts of the code...
http://lists.xen.org/archives/html/xen-devel/2012-06/msg00576.html
I guess this would fix it...
#ifdef __NetBSD__
/* MAP_LOCKED is Linux specific. MAP_WIRED is NetBSD's equivalent. */ #define MAP_LOCKED MAP_WIRED
#endif
Sadly I came across another error, still searching if it was already posted, otherwise I will!
Quoted 3 lines
Sadly I came across another error, still searching if it was already posted, otherwise I will!
Acctually the other error was about libxl (array subscript has type 'char' ) this was already mentioned!
Quoted 4 lines
Quoted 6 lines · Miguel Clara
Quoted 3 lines
Sadly I came across another error, still searching if it was already posted, otherwise I will!
Acctually the other error was about libxl (array subscript has type 'char' ) this was already mentioned!
DO you have a reference? Was there a patch?
Ian.
here: http://www.gossamer-threads.com/lists/xen/devel/282660
- fix error: array subscript has type 'char'
Quoted 12 lines · Ian Campbell
Quoted 6 lines · Miguel Clara
Quoted 3 lines
Sadly I came across another error, still searching if it was already posted, otherwise I will!
Acctually the other error was about libxl (array subscript has type 'char' ) this was already mentioned!
DO you have a reference? Was there a patch?
Ian.
Quoted 8 lines · Miguel Clara
Quoted 6 lines · Christoph Egger <chegger <at> amazon.de> writes:
Hi,
tools/misc/xencov.cfails to build.
NetBSD does not haveMAP_LOCKED.
Quoted 8 lines
Quoted 2 lines
Christoph
I wanted to test 4.3 on NetBSD but ended up with this problem too... In fact this happened before in other parts of the code...
http://lists.xen.org/archives/html/xen-devel/2012-06/msg00576.htmlI guess this would fix it...
Please can you confirm and if so submit a patch
See http://wiki.xen.org/wiki/Submitting_Xen_Patches for some hints on how to do that.
Quoted 18 lines
#ifdef
__NetBSD__
/*MAP_LOCKEDis Linux specific.MAP_WIREDis NetBSD's equivalent. */ #defineMAP_LOCKEDMAP_WIRED
#endifSadly I came across another error, still searching if it was already posted, otherwise I will!
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
For now I simply added the code to tools/misc/xencov.c
Not sure if its the best way to do it.
Quoted 16 lines · Ian Campbell
Quoted 15 lines · Miguel Clara
Quoted 8 lines · Christoph Egger <chegger <at> amazon.de> writes:
Hi,
tools/misc/xencov.cfails to build.
NetBSD does not haveMAP_LOCKED.Christoph
I wanted to test 4.3 on NetBSD but ended up with this problem too... In fact this happened before in other parts of the code...
http://lists.xen.org/archives/html/xen-devel/2012-06/msg00576.html
Quoted 27 lines
Quoted 1 line
I guess this would fix it...
Please can you confirm and if so submit a patch
See http://wiki.xen.org/wiki/Submitting_Xen_Patches for some hints on how to do that.
Quoted 18 lines
#ifdef
__NetBSD__
/*MAP_LOCKEDis Linux specific.MAP_WIREDis NetBSD's equivalent. */ #defineMAP_LOCKEDMAP_WIRED
#endifSadly I came across another error, still searching if it was already posted, otherwise I will!
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
xencov.c_netbsd.patch renamed from misc/xencov.c +5 -0
@@ -26,6 +26,11 @@ #include <err.h> #include <sys/mman.h> +#ifdef __NetBSD__ +/* MAP_LOCKED is Linux specific. MAP_WIRED is NetBSD's equivalent. */ +#define MAP_LOCKED MAP_WIRED +#endif + static xc_interface *gcov_xch = NULL; static void gcov_init(void)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 36 lines · Miguel Clara
For now I simply added the code to
tools/misc/xencov.cNot sure if its the best way to do it.
Quoted 31 lines · Ian Campbell
Quoted 8 lines · Miguel Clara
Quoted 6 lines · Christoph Egger <chegger <at> amazon.de> writes:
Hi,
tools/misc/xencov.cfails to build.
NetBSD does not haveMAP_LOCKED.Quoted 8 lines
Quoted 2 lines
Christoph
I wanted to test 4.3 on NetBSD but ended up with this problem too... In fact this happened before in other parts of the code...
http://lists.xen.org/archives/html/xen-devel/2012-06/msg00576.htmlI guess this would fix it...
Please can you confirm and if so submit a patch
See http://wiki.xen.org/wiki/Submitting_Xen_Patches for some hints on how to do that.
Quoted 8 lines
#ifdef
__NetBSD__
/*MAP_LOCKEDis Linux specific.MAP_WIREDis NetBSD's equivalent. */ #defineMAP_LOCKEDMAP_WIRED
#endifSadly I came across another error, still searching if it was already posted, otherwise I will!
I send this as a proper patch. Please add your Signed-off-by.
Christoph