commit b738448a2f1c41d939c079280069510fc32eec2d
parent 42bee2fba23f408638eea77280e0598e96c25006
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 4 Dec 2018 09:02:32 +0100
Fix compilation on system with GLIBC < 2.19
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/htcp.c b/src/htcp.c
@@ -15,6 +15,7 @@
#define _POSIX_C_SOURCE 200809L /* mmap support */
#define _DEFAULT_SOURCE 1 /* MAP_POPULATE support */
+#define _BSD_SOURCE 1 /* MAP_POPULATE for glibc < 2.19 */
#include "htcp.h"
@@ -257,7 +258,7 @@ release_htcp(ref_T* ref)
******************************************************************************/
res_T
htcp_create
- (struct logger* log,
+ (struct logger* in_logger,
struct mem_allocator* mem_allocator,
const int verbose,
struct htcp** out_htcp)
@@ -273,7 +274,7 @@ htcp_create
}
allocator = mem_allocator ? mem_allocator : &mem_default_allocator;
- logger = log ? log : LOGGER_DEFAULT;
+ logger = in_logger ? in_logger : LOGGER_DEFAULT;
htcp = MEM_CALLOC(allocator, 1, sizeof(struct htcp));
if(!htcp) {