Package: fglrx-driver
Version: 1:10-2-1

Hi,

fglrx doesn't build with linux 2.6.33, as some internal cmpxchg macro is used 
which got changed.

The attached patch uses the real cmpxchg macro, which needs some casting 
before, depending on the size of the data.
# Fix broken usage of internal macro; fixes compiling with 2.6.33

diff -Naur fglrx-driver-10-2.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-10-2/common/lib/modules/fglrx/build_mod/firegl_public.c
--- fglrx-driver-10-2.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2010-02-17 20:34:34.000000000 +0100
+++ fglrx-driver-10-2/common/lib/modules/fglrx/build_mod/firegl_public.c	2010-02-24 21:23:51.580872456 +0100
@@ -1472,7 +1472,16 @@
 #ifndef __HAVE_ARCH_CMPXCHG
     return __fgl_cmpxchg(ptr,old,new,size);
 #else
-    return __cmpxchg(ptr,old,new,size);
+    switch (size) {
+    case 1: { volatile u8 *_ptr = ptr; return cmpxchg(_ptr, old, new); }
+    case 2: { volatile u16 *_ptr = ptr; return cmpxchg(_ptr, old, new); }
+    case 4: { volatile u32 *_ptr = ptr; return cmpxchg(_ptr, old, new); }
+#ifdef __x86_64__
+    case 8: { volatile u64 *_ptr = ptr; return cmpxchg(_ptr, old, new); }
+#endif
+    default:
+        return old;
+    }
 #endif
 }
 

Reply via email to