jonashaag/bjoern — pull request #59 by patricklucas (2012-02-27 05:06:49+00:00)
Title: OSX support

IT DOESN'T WORK YET (Much progress, and doesn't break anything on Linux, but not fully working on OSX yet)

- use correct API for sendfile on OSX
- extern some variables so it compiles under clang
- set sin_len on the sockaddr_in struct (See http://stackoverflow.com/
questions/2244409/eaddrnotavail-when-binding-127-0-0-1-on-localhost for reasoning)

Everything is building fine, and even appears to work - the bind() and server_init() both return successfully. However, based on netstat output, nothing is actually listening on the specified port, though if I use a unix socket everything works fine.

I'm still working on it, but posting here for discussion/suggestions.