1.5.1 build fails on OS X when using libc++ #46

Closed
lucas-clemente opened this Issue Dec 30, 2012 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

lucas-clemente commented Dec 30, 2012

Compiling the 1.5.1 prerelease using libc++ fails in the file DirectoryWatcher.cpp.

src/DirectoryWatcher.cpp:419:4: error: use of undeclared identifier 'close'
                        close(_dirFD);
                        ^
src/DirectoryWatcher.cpp:426:3: error: use of undeclared identifier 'close'
                close(_dirFD);
                ^
src/DirectoryWatcher.cpp:427:3: error: use of undeclared identifier 'close'
                close(_queueFD);
                ^

My configure command was

../src/configure --prefix=../install --no-tests --no-samples --cflags='-fPIC -stdlib=libc++' --static --omit=Data,Zip --config=Darwin64-clang

As a fix, #include <unistd.h> should be inserted in the file on OS X. I have not submitted a pull request since I'm not 100% sure where in the file to put it.

aleks-f was assigned Dec 30, 2012

Owner

aleks-f commented Dec 30, 2012

Thanks, fixed:

7094df5

aleks-f closed this Dec 30, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment