diff --git a/Makefile b/Makefile index 312cf5d..bfa0bed 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ B64_OBJS?=src/b64/cencode.o FORMAT_OBJS?=src/formats/json.o src/formats/raw.o src/formats/common.o src/formats/custom-type.o HTTP_PARSER_OBJS?=src/http-parser/http_parser.o -CFLAGS ?= -std=c99 -Wall -Wextra -Isrc -Isrc/jansson/src -Isrc/http-parser -MD +CFLAGS ?= -std=c99 -Wall -Wextra -Isrc -Isrc/jansson/src -Isrc/http-parser -MD -D_POSIX_C_SOURCE=200809L LDFLAGS ?= -levent -pthread # Pass preprocessor macros to the compile invocation diff --git a/src/hiredis/fmacros.h b/src/hiredis/fmacros.h index 3227faa..6da4238 100644 --- a/src/hiredis/fmacros.h +++ b/src/hiredis/fmacros.h @@ -2,7 +2,9 @@ #define __HIREDIS_FMACRO_H #define _XOPEN_SOURCE 600 +#ifndef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200112L +#endif #if defined(__APPLE__) && defined(__MACH__) /* Enable TCP_KEEPALIVE */