RC1 compilation error with 10.6 SDK

I get the following error if I try to compile with the current 10.6 SDK on Mac OS X:

/Volumes/Work/D-084/MakeAdds/OSX/SDKs/MacOSX10.6.sdk/usr/include/unistd.h:512:8: error: declaration of built-in function ‘vfork’ requires inclusion of the header <setjmp.h> [-Werror]

The official Apple build (from the Xcode 4.2 tools) didn’t exhibit the same problem.
I know I could turn off ‘-Werror’, but my goal is to increase the warning level.

This is a real problem for freeware sources, because we would like to keep them intact.

Shall I wait for the next official Apple release, or is it something that can be fixed here?


Ákos Somorjai

Developer Support Manager

GRAPHISOFT | Graphisoft Park 1. Budapest 1031 Hungary | +36 1 437-3000 | asomorjai@graphisoft.com

This is fixed in trunk (r142007) and (I believe) 3.0. What version of clang are you using?

- Ben

clang version 3.0 (tags/RELEASE_30/rc1)
Target: x86_64-apple-darwin11.2.0
Thread model: posix


Hello Ben,

The same problem shows up with the rc3 build. Could you please get this
fixed before the final release?



Hi Bill,

I believe the reason for this behavior is that r142531 is missing from the release_30 branch.
Can you squeeze it in? It's important and already Doug-approved.

Correct function can be verified on OSX and xcode4.2 with
$ clang -cc1 -fsyntax-only /Developer/SDKs/MacOSX10.6.sdk/usr/include/unistd.h

- Ben

Thanks, folks, this is working now in rc4.