Skip to content

Commit d058c56

Browse files
committed
bugfix: compile error on mac. openresty#13
1 parent e4062ae commit d058c56

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,10 @@ INSTALL ?= install
77

88
.PHONY: all test install bench
99

10-
OS := $(shell uname)
11-
1210
SRC := chash.c
1311
OBJ := $(SRC:.c=.o)
1412

15-
ifeq ($(OS), Darwin)
16-
C_SO_NAME := libchash.dylib
17-
else
1813
C_SO_NAME := libchash.so
19-
endif
2014

2115
CFLAGS := -Wall -O3 -flto -g -DFP_RELAX=0 -DDEBUG
2216
THE_CFLAGS := $(CFLAGS) -fPIC -MMD -fvisibility=hidden

chash.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
#include "chash.h"
55

66

7+
#ifndef u_char
8+
#define u_char unsigned char
9+
#endif
10+
711

812
#define crc32_final(crc) \
913
crc ^= 0xffffffff

0 commit comments

Comments
 (0)