deepfryed / beanstalk-client

C/C++ beanstalk client
59 stars 44 forks source link

won't compilte with -std=c99 #1

Closed deric closed 12 years ago

deric commented 12 years ago

When compiling with -std=c99 I get following error:

 beanstalk.c:65:41: error: dereferencing pointer to incomplete type
 beanstalk.c:66:16: error: dereferencing pointer to incomplete type
 beanstalk.c:67:32: error: dereferencing pointer to incomplete type
deepfryed commented 12 years ago

yeah getaddrinfo family doesn't play well with c99 - why do you need it though ?

ps: makefile patches welcome ;)

shanna commented 12 years ago

It has been an issue for a long time:

https://groups.google.com/forum/?fromgroups#!topic/gnu.gcc.help/a88eE4Ga73o https://groups.google.com/forum/?fromgroups#!topic/comp.lang.c/pRuQ2e2FgNY

deric commented 12 years ago

Oh, I see. Well, it's not really necessary, I though that there would an easy patch for this.

shanna commented 12 years ago

So did I Deric :(

deepfryed commented 12 years ago

so looks like forcing posix compatibility fixes those errors

-D_POSIX_SOURCE -std=c99

https://groups.google.com/group/gnu.gcc.help/browse_thread/thread/6bcf1e13819aef7a