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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Tue Apr 23 09:01:27 2024 UTC