Bug 426333 - [kernel-headers] Compiles using the macro 'NBPG' fail as PAGE_SIZE is not defined in /usr/include/asm/page.h
[kernel-headers] Compiles using the macro 'NBPG' fail as PAGE_SIZE is not def...
Product: Fedora
Classification: Fedora
Component: mono-debugger (Show other bugs)
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Paul F. Johnson
Fedora Extras Quality Assurance
Depends On:
Blocks: fedora-ia64
  Show dependency treegraph
Reported: 2007-12-20 02:00 EST by Zhan, Yi
Modified: 2008-10-08 15:28 EDT (History)
0 users

See Also:
Fixed In Version: rawhide
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-10-08 15:28:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Zhan, Yi 2007-12-20 02:00:47 EST
Description of problem:

The issue only happens on ia64 platform. The header file /usr/include/asm/user.h
has '#define NBPG PAGE_SIZE', but the definition of PAGE_SIZE is unavailable. In
fact, the file /usr/include/asm/page.h contains nothing other than comments.
This leads to compilation errors when building packages using NBPG or PAGE_SIZE
such as xen and mono-debugger.

Is there a clean way to put PAGE_SIZE and PAGE_SHIFT to the header file? Not
sure if the values decided by CONFIG_PAGE_SIZE could be used here.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Complies a file which include <asm/user.h> and use the macro NBPG.
Actual results:

Expected results:

Additional info:
Actually some package (mono-debugger) include <sys/user.h> to use NBPG. But
since the definitions in <sys/user.h> are provided by kernel-headers, I report
the issue here.
Comment 1 Doug Chapman 2008-03-05 17:52:27 EST
this is actually a bug in mono-debugger itself.

using the PAGE_SIZE macro is not portable and not the right way to get the size
of a page.  It should use getpagesize() instead.

reassigning to mono-debugger.
Comment 2 Bug Zapper 2008-05-14 00:13:15 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
Comment 3 Paul F. Johnson 2008-10-08 15:28:18 EDT
This is fixed in the current version - I'm trying to get mdebugger 0.6 into f9 currently

Note You need to log in before you can comment on or make changes to this bug.