Bug 780 - MAP_ANON not defined in HP-UX 11.31
MAP_ANON not defined in HP-UX 11.31
Product: unbound
Classification: Unclassified
Component: server
Other other
: P5 normal
Assigned To: unbound team
Depends on:
  Show dependency treegraph
Reported: 2016-06-14 12:21 CEST by Richard Lloyd
Modified: 2016-06-14 12:28 CEST (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Richard Lloyd 2016-06-14 12:21:17 CEST
compat/arc4random.c and compat/getentropy_linux.c both use the MAP_ANON definition, but HP-UX 11.31 doesn't define this in its system headers.

Fortunately, the HP-UX headers do define an equivalent, namely MAP_ANONYMOUS, so adding this code after the system header inclusions to the two files mentioned above allows the files to be compiled on HP-UX 11.31:

#ifndef MAP_ANON
Comment 1 Wouter Wijngaards 2016-06-14 12:28:48 CEST
Hi Richard,

Thank you for the fixes.  Applied in code repository.

If you have the code repository; 'make test' will run a self-test.

Best regards, Wouter