]> xenbits.xensource.com Git - people/liuw/rumprun.git/commitdiff
define container_of iff not already visible via normal headers
authorAntti Kantee <pooka@iki.fi>
Thu, 23 Apr 2015 11:37:45 +0000 (11:37 +0000)
committerAntti Kantee <pooka@iki.fi>
Thu, 23 Apr 2015 11:37:45 +0000 (11:37 +0000)
platform/xen/rumpxendev/rumpxen_xendev.h

index 238190b955a67b532a756fb9f0eca1dea51e9cba..a43ceebc09a64ac9fae5769cd482d1566900fc29 100644 (file)
@@ -40,7 +40,9 @@
 
 
 /* nicked from NetBSD sys/dev/pci/cxgb/cxgb_adapter.h */
+#ifndef container_of
 #define container_of(p, stype, field) ((stype *)(((uint8_t *)(p)) - offsetof(stype, field)))
+#endif
 
 //#define RUMP_DEV_XEN_DEBUG 1