Commit 91963b68 authored by Boris Manojlovic's avatar Boris Manojlovic

fixed compiling on AIX 6.1

parent 57ca7478
......@@ -3,8 +3,13 @@
#define _BSD_SOURCE
#if defined(__linux__) || defined(__OpenBSD__)
#if defined(__linux__) || defined(__OpenBSD__) || defined(_AIX)
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 700
#endif
#ifndef _XOPEN_SOURCE_EXTENDED
#define _XOPEN_SOURCE_EXTENDED
#endif
#else
#define _XOPEN_SOURCE
#endif
......
......@@ -32,7 +32,7 @@ ZLOG_MINOR=1
# Fallback to gcc when $CC is not in $PATH.
CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
OPTIMIZATION?=-O2
WARNINGS=-Wall -Werror -Wstrict-prototypes
WARNINGS=-Wall -Werror -Wstrict-prototypes -fwrapv
DEBUG?= -g -ggdb
REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG)
REAL_LDFLAGS=$(LDFLAGS) -lpthread
......@@ -60,6 +60,10 @@ ifeq ($(uname_S),Darwin)
DYLIB_MAKE_CMD=$(CC) -shared -Wl,-install_name,$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(LDFLAGS)
endif
ifeq ($(uname_S),AIX)
DYLIB_MAKE_CMD=$(CC) -shared -Wl,-G -o $(DYLIBNAME) $(LDFLAGS)
endif
all: $(DYLIBNAME) $(BINS)
# Deps (use make dep to generate this)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment