babelouest / ulfius

Web Framework to build REST APIs, Webservices or any HTTP endpoint in C language. Can stream large amount of data, integrate JSON data with Jansson, and create websocket services
https://babelouest.github.io/ulfius
GNU Lesser General Public License v2.1
1.08k stars 182 forks source link

Define MSG_NOSIGNAL if not defined #162

Closed ronangaillard closed 4 years ago

ronangaillard commented 4 years ago

MSG_NOSIGNAL is not defined on OSX.

This is a quick and dirty fix but allows me to build ulfius on OSX.

babelouest commented 4 years ago

Hello, thanks for the PR.

Although if it's related to OSX only, I'd surround this patch with another #if to test the system.

#if TARGET_OS_MAC
// Or
#if __APPLE__

Can you check if one of those work?

ronangaillard commented 4 years ago

I've also read that MSG_NOSIGNAL is not defined on some others platforms (Solaris is one of them I think).

Do you still want me to add the #if to check if on apple platform ?

babelouest commented 4 years ago

Do you still want me to add the #if to check if on apple platform ?

Yes please :-)

Apple only, I wouldn't break anything on other platforms

ronangaillard commented 4 years ago

Done :) Works and builds ok on my OSX

Let me know if you're ok with the syntax :)