Fischer, Anna
2009-Mar-16 20:35 UTC
[Xen-devel] [netchannel2] nc2_unmap_grants definition conflict?
There seems to be a conflict with nc2_unmap_grants() when both CONFIG_XEN_TEST_PINGBACK2 and CONFIG_XEN_NETDEV2_BACKEND are set. I get the following error when building the current Xen netchannel2 tree: CC drivers/xen/test/pingback2/pingback2.o LD drivers/xen/test/pingback2/built-in.o CC drivers/xen/test/pingfront/pingfront.o LD drivers/xen/test/pingfront/built-in.o CC drivers/xen/test/pingfront2/pingfront2.o LD drivers/xen/test/pingfront2/built-in.o CC drivers/xen/test/dummy.o LD drivers/xen/test/built-in.o LD drivers/xen/tpmback/built-in.o CC drivers/xen/xenbus/xenbus_client.o CC drivers/xen/xenbus/xenbus_comms.o CC drivers/xen/xenbus/xenbus_xs.o CC drivers/xen/xenbus/xenbus_probe.o CC drivers/xen/xenbus/xenbus_backend_client.o LD drivers/xen/xenbus/xenbus_be.o CC drivers/xen/xenbus/xenbus_probe_backend.o CC drivers/xen/xenbus/xenbus_dev.o LD drivers/xen/xenbus/built-in.o CC drivers/xen/util.o LD drivers/xen/built-in.o drivers/xen/netchannel2/built-in.o: In function `nc2_unmap_grants'': /home/user/Download/netchannel2/linux-2.6.18.hg/drivers/xen/netchannel2/util.c:448: multiple definition of `nc2_unmap_grants'' drivers/xen/test/built-in.o:/home/user/Download/netchannel2/linux-2.6.18.hg/drivers/xen/test/pingback2/pingback2.c:31: first defined here make[6]: *** [drivers/xen/built-in.o] Error 1 make[5]: *** [drivers/xen] Error 2 make[4]: *** [drivers] Error 2 make[3]: *** [vmlinuz] Error 2 make[2]: *** [vmlinuz] Error 2 make[2]: Leaving directory `/home/user/Download/netchannel2/xen-unstable.hg/build-linux-2.6.18-xen_x86_32'' Defining it as static like you do with nc2_map_grants() should work? diff -r 2245f3375e95 drivers/xen/test/pingback2/pingback2.c --- a/drivers/xen/test/pingback2/pingback2.c Tue Mar 03 17:53:47 2009 +0000 +++ b/drivers/xen/test/pingback2/pingback2.c Sun Mar 15 06:22:59 2009 -0700 @@ -27,7 +27,7 @@ struct pingback2_info { unsigned irq; }; -void nc2_unmap_grants(struct grant_mapping *gm) +static void nc2_unmap_grants(struct grant_mapping *gm) { struct gnttab_unmap_grant_ref op[MAX_GRANT_MAP_PAGES]; int i; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel