compile error on Mac OS X 10.3 (Panther) and the patch
dormando at rydia.net
Wed Nov 14 07:01:05 UTC 2007
Tested and committed something similar. Please harass us/me if it doesn't
work for you :) I tested it the best I could.
> Isn't here a good place to submit a patch?
> If so, could you lead me to the right place please?
> On 10/21/07, js <ebgssth at gmail.com> wrote:
>> Compiling memcached(svn trunk ver) failed with these errors.
>> $ make
>> make all-recursive
>> Making all in doc
>> make: Nothing to be done for `all'.
>> source='memcached.c' object='memcached.o' libtool=no \
>> depfile='.deps/memcached.Po' tmpdepfile='.deps/memcached.TPo' \
>> depmode=gcc3 /bin/sh ./depcomp \
>> gcc -DHAVE_CONFIG_H -I. -I. -I. -I/opt/local/include -g -O2 -c
>> `test -f 'memcached.c' || echo './'`memcached.c
>> memcached.c: In function `add_msghdr':
>> memcached.c:224: warning: assignment from incompatible pointer type
>> memcached.c: In function `add_iov':
>> memcached.c:584: error: `IOV_MAX' undeclared (first use in this function)
>> memcached.c:584: error: (Each undeclared identifier is reported only once
>> memcached.c:584: error: for each function it appears in.)
>> make: *** [memcached.o] Error 1
>> make: *** [all-recursive] Error 1
>> make: *** [all] Error 2
>> This is because OS X 10.3, unlike 10.4, doesn't have IOV_MAX in limits.h.
>> Below is my patch.
>> Index: memcached.c
>> --- memcached.c (revision 629)
>> +++ memcached.c (working copy)
>> @@ -52,9 +52,9 @@
>> -/* FreeBSD 4.x doesn't have IOV_MAX exposed. */
>> +/* FreeBSD 4.x and old OSX don't have IOV_MAX exposed. */
>> #ifndef IOV_MAX
>> -#if defined(__FreeBSD__)
>> +#if defined(__FreeBSD__) || defined(__APPLE__)
>> # define IOV_MAX 1024
>> __APPLE__is the flag for darwin.
>> I don't know whether this is right fix or not
>> so could someone please review this patch and accept this or write better patch?
>> Thank you in advance.
More information about the memcached