diff options
author | Thomas Hellstrom <unichrome@shipmail.org> | 2004-11-23 17:29:47 +0000 |
---|---|---|
committer | Thomas Hellstrom <unichrome@shipmail.org> | 2004-11-23 17:29:47 +0000 |
commit | 359c8b9d75372ecd1f78cdb0bfccd134577d9c31 (patch) | |
tree | 4f881b772f45f01df57a8ee7b1d7816adc2e916f | |
parent | 120c3035f60138ad15599b0b0c4468400e966423 (diff) |
Bugzilla #1883 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1883): Fixxprint_packagertest_20041125_basexprint_packagertest_20041125
insufficient SHM detection in XvMC local test. Removed reference to
getpagesize() which caused linking problems on s390. Reported by Stefan
Dirsch <sndirsh@suse.de>
-rw-r--r-- | src/XvMC.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -5,9 +5,14 @@ #include <stdio.h> #include "XvMClibint.h" #ifdef HAS_SHM +#ifndef Lynx #include <sys/ipc.h> #include <sys/shm.h> -#endif +#else +#include <ipc.h> +#include <shm.h> +#endif /* Lynx */ +#endif /* HAS_SHM */ #include <unistd.h> #include <sys/time.h> #include <X11/extensions/Xext.h> @@ -500,7 +505,7 @@ Status XvMCGetDRInfo(Display *dpy, XvPortID port, magic = 0; req->magic = 0; #ifdef HAS_SHM - req->shmKey = shmget(IPC_PRIVATE, getpagesize(), IPC_CREAT | 0600); + req->shmKey = shmget(IPC_PRIVATE, 1024, IPC_CREAT | 0600); /* * We fill a shared memory page with a repetitive pattern. If the @@ -522,7 +527,7 @@ Status XvMCGetDRInfo(Display *dpy, XvPortID port, gettimeofday( &now, &here); magic = now.tv_usec & 0x000FFFFF; req->magic = magic; - i = getpagesize() / sizeof(CARD32); + i = 1024 / sizeof(CARD32); while(i--) { *shMemC++ = magic; magic = ~magic; |