File xawtv.PAGE_SIZE.patch of Package xawtv
---
console/fbtools.c | 6 ------
console/matrox.c | 5 +++--
2 files changed, 3 insertions(+), 8 deletions(-)
--- a/console/fbtools.c
+++ b/console/fbtools.c
@@ -21,14 +21,8 @@
#include <linux/vt.h>
#include <linux/fb.h>
-#include <asm/page.h>
-
-#ifndef PAGE_SIZE
#define PAGE_SIZE getpagesize()
-#endif
-#ifndef PAGE_MASK
#define PAGE_MASK (~(PAGE_SIZE - 1))
-#endif
#include "fbtools.h"
--- a/console/matrox.c
+++ b/console/matrox.c
@@ -9,7 +9,6 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
-#include <asm/page.h> /* PAGE_SIZE */
#include <linux/fb.h>
#include "byteswap.h"
@@ -17,6 +16,8 @@
#include "fbtools.h"
#include "matrox.h"
+#define PAGE_SIZE getpagesize()
+#define PAGE_MASK (~(PAGE_SIZE - 1))
/* ---------------------------------------------------------------------- */
/* generic */
@@ -226,7 +227,7 @@ gfx_init(int fd)
return -1;
}
off = (unsigned long)fb_fix.mmio_start -
- ((unsigned long)fb_fix.mmio_start & ~(PAGE_SIZE-1));
+ ((unsigned long)fb_fix.mmio_start & PAGE_MASK);
bmmio += off;
mmio = (uint32_t*)bmmio;
return 0;