Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 112175 Details for
Bug 169388
media-libs/libsdl fails to compile w/ linux-headers-2.6.20
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
libsdl-1.2.11-pagesize.patch
libsdl-1.2.11-pagesize.patch (text/plain), 3.00 KB, created by
Peter Alfredsen (RETIRED)
on 2007-03-05 16:08:07 UTC
(
hide
)
Description:
libsdl-1.2.11-pagesize.patch
Filename:
MIME Type:
Creator:
Peter Alfredsen (RETIRED)
Created:
2007-03-05 16:08:07 UTC
Size:
3.00 KB
patch
obsolete
>From Mandriva. Realigned for Gentoo by Peter Alfredsen > >--- SDL-1.2.11.orig/src/video/fbcon/SDL_fbvideo.c 2007-03-05 16:10:28.000000000 +0100 >+++ SDL-1.2.11/src/video/fbcon/SDL_fbvideo.c 2007-03-05 16:35:31.000000000 +0100 >@@ -27,17 +27,12 @@ > #include <stdio.h> > #include <fcntl.h> > #include <unistd.h> > #include <sys/ioctl.h> > #include <sys/mman.h> >-#include <asm/page.h> /* For definition of PAGE_SIZE */ > #include <linux/vt.h> > >-#ifndef PAGE_SIZE >-# define PAGE_SIZE sysconf(_SC_PAGE_SIZE) >-#endif >- > #include "SDL_video.h" > #include "SDL_mouse.h" > #include "../SDL_sysvideo.h" > #include "../SDL_pixels_c.h" > #include "../../events/SDL_events_c.h" >@@ -549,11 +544,11 @@ > } > } > > /* Memory map the device, compensating for buggy PPC mmap() */ > mapped_offset = (((long)finfo.smem_start) - >- (((long)finfo.smem_start)&~(PAGE_SIZE-1))); >+ (((long)finfo.smem_start)&~((int)sysconf(_SC_PAGE_SIZE)-1))); > mapped_memlen = finfo.smem_len+mapped_offset; > mapped_mem = do_mmap(NULL, mapped_memlen, > PROT_READ|PROT_WRITE, MAP_SHARED, console_fd, 0); > if ( mapped_mem == (char *)-1 ) { > SDL_SetError("Unable to memory map the video hardware"); >--- SDL-1.2.11.orig/src/video/ps2gs/SDL_gsyuv.c 2007-03-05 16:10:28.000000000 +0100 >+++ SDL-1.2.11/src/video/ps2gs/SDL_gsyuv.c 2007-03-05 16:29:36.000000000 +0100 >@@ -25,12 +25,11 @@ > > #include <fcntl.h> > #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 */ > #ifndef PAGE_SIZE > # define PAGE_SIZE sysconf(_SC_PAGE_SIZE) > #endif > > #include "SDL_video.h" >@@ -182,11 +181,11 @@ > return(NULL); > } > > /* 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)) + > 12 * sizeof(long long); > hwdata->dma_mem = mmap(0, hwdata->dma_len, PROT_READ|PROT_WRITE, >--- SDL-1.2.11.orig/src/video/Xext/Xxf86dga/XF86DGA.c 2006-05-01 10:02:47.000000000 +0200 >+++ SDL-1.2.11/src/video/Xext/Xxf86dga/XF86DGA.c 2007-03-05 16:31:56.000000000 +0100 >@@ -16,11 +16,10 @@ > > #if defined(linux) > #define HAS_MMAP_ANON > #include <sys/types.h> > #include <sys/mman.h> >-#include <asm/page.h> /* PAGE_SIZE */ > #define HAS_SC_PAGESIZE /* _SC_PAGESIZE may be an enum for Linux */ > #define HAS_GETPAGESIZE > #endif /* linux */ > > #if defined(CSRG_BASED) >@@ -489,14 +488,10 @@ > #endif > #ifdef HAS_GETPAGESIZE > if (pagesize == -1) > pagesize = getpagesize(); > #endif >-#ifdef PAGE_SIZE >- if (pagesize == -1) >- pagesize = PAGE_SIZE; >-#endif > if (pagesize == -1) > pagesize = 4096; > > delta = address % pagesize; > offset = address - delta;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 169388
:
112174
| 112175 |
112177
|
113222