---
 src/gallium/drivers/swr/rasterizer/common/os.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/gallium/drivers/swr/rasterizer/common/os.h 
b/src/gallium/drivers/swr/rasterizer/common/os.h
index 7bfc66f..675fe42 100644
--- a/src/gallium/drivers/swr/rasterizer/common/os.h
+++ b/src/gallium/drivers/swr/rasterizer/common/os.h
@@ -97,6 +97,14 @@ typedef unsigned int    DWORD;
 #define __declspec(X)
 #endif
 
+#if !defined(offsetof)
+    #ifdef __cplusplus
+        #define offsetof(s,m) ((size_t)&reinterpret_cast<char const 
volatile&>((((s*)0)->m)))
+    #else
+        #define offsetof(s,m) ((size_t)&(((s*)0)->m))
+    #endif
+#endif // offsetof
+
 #define GCC_VERSION (__GNUC__ * 10000 \
                      + __GNUC_MINOR__ * 100 \
                      + __GNUC_PATCHLEVEL__)
-- 
1.9.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to