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

Building on OS X fails #20

Open
omnidan opened this issue Jul 26, 2014 · 3 comments
Open

Building on OS X fails #20

omnidan opened this issue Jul 26, 2014 · 3 comments

Comments

@omnidan
Copy link

omnidan commented Jul 26, 2014

On OS X, building nope.c fails for me with:

> make
gcc -W -Wall -O2 -c -o nope.o nope.c
nope.c:13:10: fatal error: 'sys/sendfile.h' file not found
#include <sys/sendfile.h>
         ^
1 error generated.
make: *** [nope.o] Error 1

gcc --version output:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix
@sternenseemann
Copy link

@omnidan
Copy link
Author

omnidan commented Jul 27, 2014

So it won't work on OS X without rewriting? That's a shame. You could check for #ifdef __APPLE__ though. The thing is, it doesn't say anywhere that it only works on Linux. So it probably doesn't work on Windows either, I guess?

@gsquire
Copy link

gsquire commented Jul 30, 2014

read and write is more portable. #ifdef just adds more complexity.

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

3 participants