swatantra / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Compilation fails on OpenBSD/-current due to missing pthread.h include #274

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. cd src
2. gmake

What is the expected output? What do you see instead?

$ gmake
cc -c -std=c99 -pedantic -O2 -Wall -W   -g -rdynamic -ggdb   redis.c
In file included from redis.c:30:
redis.h:414: error: syntax error before "pthread_mutex_t"
redis.h:517: error: syntax error before "pthread_t"
redis.c: In function `genRedisInfoString':
redis.c:1188: warning: long int format, time_t arg (arg 9)
redis.c:1188: warning: long int format, int arg (arg 10)
redis.c:1188: warning: long int format, time_t arg (arg 18)
redis.c: In function `tryFreeOneObjectFromFreelist':
redis.c:1272: error: structure has no member named `obj_freelist_mutex'
redis.c:1277: error: structure has no member named `obj_freelist_mutex'
redis.c:1281: error: structure has no member named `obj_freelist_mutex'
gmake: *** [redis.o] Error 1

What version of the product are you using? On what operating system?

Revision 3688d7f308877dd2e2c0, OpenBSD -current (i386).

Please provide any additional information below.

Compilation is fixed by including pthread.h in redis.h; trivial patch at:

http://code.lfod.us/redis-patches/raw-file/tip/fix-build.patch

Thanks!

Original issue reported on code.google.com by willma...@ml1.net on 5 Jul 2010 at 5:59

GoogleCodeExporter commented 8 years ago
Fixed, thanks! Please can you verify?

Cheers,
Salvatore

Original comment by anti...@gmail.com on 5 Jul 2010 at 6:16

GoogleCodeExporter commented 8 years ago
Hi Salvatore-

Compilation succeeds (and most tests pass) with the latest from github. Thanks 
for fixing the issue so quickly!

Original comment by willma...@ml1.net on 5 Jul 2010 at 6:21

GoogleCodeExporter commented 8 years ago
Hello Will, sorry for the very late follow up. Please can you provide a list of 
failing tests? Thanks.

Original comment by anti...@gmail.com on 30 Aug 2010 at 4:22

GoogleCodeExporter commented 8 years ago
Hi Salvatore-

Latest github master (5d633fc9987b) passes all tests on OpenBSD-current/i386.

Thanks!

Original comment by willma...@ml1.net on 31 Aug 2010 at 11:46