Bug 780

Summary: MAP_ANON not defined in HP-UX 11.31
Product: unbound Reporter: Richard Lloyd <rkl>
Component: serverAssignee: unbound team <unbound-team>
Status: RESOLVED FIXED    
Severity: normal CC: cathya, wouter
Priority: P5    
Version: 1.5.9   
Hardware: Other   
OS: other   

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
#define MAP_ANON MAP_ANONYMOUS
#endif
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