Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error on Mac OSX #32

Open
psaintjust opened this issue Oct 4, 2016 · 1 comment
Open

Compile error on Mac OSX #32

psaintjust opened this issue Oct 4, 2016 · 1 comment

Comments

@psaintjust
Copy link

beanstalk-client/beanstalk.c:267:74: error: use of undeclared identifier 'MSG_NOSIGNAL'
return send(fd, message, size, bs_poll ? MSG_DONTWAIT|MSG_NOSIGNAL : MSG_NOSIGNAL);

MSG_NOSIGNAL is not defined on Mac OSX - introduced by #31

@psaintjust psaintjust changed the title Compile error on Mac Compile error on Mac OSX Oct 4, 2016
@lippenyit
Copy link

Put the following line in beanstalk.c after includes:
#define MSG_NOSIGNAL 0x2000 /* don't raise SIGPIPE */

HeroCC added a commit to HeroCC/moos-ivp-cc that referenced this issue Dec 31, 2019
Tested on MacOS High Sierra. Recent BSD manpages for send(2) define MSG_NOSIGNAL to be 0x20000. The MacOS BSD variant doesn't declare MSG_NOSIGNAL, but does honor the value. So, we backport it.

See https://www.freebsd.org/cgi/man.cgi?query=send&sektion=2&manpath=FreeBSD+12.1-stable
Thanks deepfryed/beanstalk-client#32 (comment) for the hint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants