Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release-src > by-pkgid > bcb34a91b774ff74870fd0c0086a1a54 > files > 3

SDL12-1.2.15-16.mga5.src.rpm

--- SDL-1.2.12/src/video/ps2gs/SDL_gsyuv.c.pagesize	2007-07-26 11:19:38.000000000 +0800
+++ SDL-1.2.12/src/video/ps2gs/SDL_gsyuv.c	2007-07-26 11:20:34.000000000 +0800
@@ -27,7 +27,8 @@
 #include <unistd.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
-#include <asm/page.h>		/* For definition of PAGE_SIZE */
+/* There is no PAGE_SIZE define anymore, use sysconf from unistd.h instead */
+#include <unistd.h>
 
 #include "SDL_video.h"
 #include "SDL_gsyuv_c.h"
@@ -180,7 +181,7 @@
 
 	/* Allocate a DMA area for pixel conversion */
 	bpp = this->screen->format->BytesPerPixel;
-	map_offset = (mapped_len + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
+	map_offset = (mapped_len + ((int)sysconf(_SC_PAGE_SIZE) - 1)) & ~((int)sysconf(_SC_PAGE_SIZE) - 1);
 	hwdata->dma_len = hwdata->macroblocks * (16 * 16 + 8 * 8 + 8 * 8) +
 	                  width * height * bpp +
 	                  hwdata->macroblocks * (16 * sizeof(long long)) +