File testgart-buildfix.diff of Package testgart

--- testgart.c.old	2004-08-06 08:19:34.896461984 +0200
+++ testgart.c	2004-08-06 08:20:42.135534781 +0200
@@ -8,6 +8,8 @@
  */ 
 
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 #include <sys/ioctl.h>
 #include <fcntl.h>
--- testgart.c.old	2004-08-06 10:31:05.418421252 +0000
+++ testgart.c	2004-08-06 12:20:38.560406002 +0000
@@ -247,8 +247,13 @@
 
 #if defined (__i386__) || defined (__x86_64__)
 void FlushWriteCombining( void ) {
+#if defined(__i386__)
 	__asm__ volatile( " push %%eax ; xchg %%eax, %0 ; pop %%eax" : : "m" (xchangeDummy));
 	__asm__ volatile( " push %%eax ; push %%ebx ; push %%ecx ; push %%edx ; movl $0,%%eax ; cpuid ; pop %%edx ; pop %%ecx ; pop %%ebx ; pop %%eax" : /* no outputs */ :  /* no inputs */ );
+#else
+        __asm__ volatile( " push %%rax ; xchg %%eax, %0 ; pop %%rax" : : "m" (xchangeDummy));
+        __asm__ volatile( " push %%rax ; push %%rbx ; push %%rcx ; push %%rdx ; movl $0,%%eax ; cpuid ; pop %%rdx ; pop %%rcx ; pop %%rbx ; pop %%rax" : /* no outputs */ :  /* no inputs */ );
+#endif
 }
 #endif
 
openSUSE Build Service is sponsored by