William Pool wrote:

I was able to use the Sun Studio compiler by making the following changes:

memcached.h line 105:
I am no expert on this, but I _thought_ that if you specified a constant expression for the array size, it had to be a value greater than zero. Someone with more detailed knowledge may provide a better answer to this. What I did was just to increase the array size to one. I have not _analyzed_ the use of this variable, but my guess after a quick look is that it is just used to calculate an offset.

105c105
<     void * end[0];
---
>     void * end[1];

memcached.c:
You get some compiler warnings for not including signal.h, but the compilation errors comes from the inline keyword added to process_stats_detail. If my memory is correct you cannot call static functions from an inlined function with non-static linkage. If you make process_stats_detail static it will compile and link

21a22
> #include <signal.h>
816c817
< inline void process_stats_detail(conn *c, const char *command) {
---
> static inline void process_stats_detail(conn *c, const char *command) {

With these modifications I was able to compile and link the source.

I would be great if someone could correct me if my memory is wrong.. It may be an obsolete cache entry ;-)

Trond Norbye

Reply via email to