1 |
the very latest linux-headers package no longer installs asm/page.h ... this |
2 |
will (and is) causing trouble for many packages |
3 |
|
4 |
no, the answer is not any of the following: |
5 |
- start installing asm/page.h again |
6 |
- screw with /usr/src/linux/include/asm/page.h |
7 |
- patch asm/page.h internally |
8 |
|
9 |
the solution here is quite simple: |
10 |
- dont include asm/page.h |
11 |
- dont use the PAGE_SIZE define |
12 |
- use the getpagesize() or sysconf(_SC_PAGESIZE) functions from unistd.h |
13 |
|
14 |
people who are maintaining portable programs and want to work with upstream to |
15 |
get the issue properly resolved (this should apply to everyone :P) may want |
16 |
to introduce some sort of configure magic to see which of these may be |
17 |
usuable (in order of preference): |
18 |
- unistd.h + _SC_PAGESIZE (or _SC_PAGE_SIZE) + sysconf() |
19 |
- unistd.h + getpagesize() |
20 |
- asm/page.h + PAGE_SIZE |
21 |
-mike |