php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57614 The identifier "MAP_ANON" is undefined.
Submitted: 2007-04-08 07:25 UTC Modified: 2008-09-08 16:40 UTC
From: joerg@php.net Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 5.2.1 OS: IRIX 6.5.30
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: joerg@php.net
New email:
PHP Version: OS:

 

 [2007-04-08 07:25 UTC] joerg@php.net
Description:
------------
Compiling current apc 3.0.14 on IRIX 6.5.30 with the mips pro 7.4.4m compiler return the following error.

cc-1020 c99: ERROR File = /usr2/MIPS/APC-3.0.14/apc_mmap.c, Line = 55
  The identifier "MAP_ANON" is undefined.

          shmaddr = (void *)mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
                                                                                  ^

It works when using the "--disable-apc-mmap" option.

regards
Joerg


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-12 10:33 UTC] wirth at bison-soft dot de
AFAIK, IRIX doesn't support MAP_ANON or MAP_ANONYMOUS for mmapping anonymous pages. If you want to use APC with mmap, you can try to open /dev/zero and mmap that. Conceptionally something like:

mfd = open('/dev/zero',O_RDWR);
shmaddr = (void *)mmap(NULL,size,PROT_READ | PROT_WRITE,
MAP_SHARED,mfd,0);

Sorry, i can't help you with a patch because i have no IRIX system available, but maybe you could make a fixing patch yourself with this background information.
 [2007-04-12 11:16 UTC] wirth at bison-soft dot de
Taking a look on apc_mmap.c, the /dev/zero handling is already used when

apc.mmap_file_mask=/dev/zero,

so you just need to insert the proper #ifdefs / autoconf rules
 [2008-09-08 16:40 UTC] shire@php.net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 17:01:31 2024 UTC