Version: unspecified (using Devel) OS: Linux #include <unistd.h> is missing in two places: kdevplatform/util/dbus_socket_transformer/main.cpp:64:22: error: ‘getuid’ was not declared in this scope kdevelop/debuggers/gdb/unittests/debugeethreads.cpp:38:18: error: ‘usleep’ was not declared in this scope Simply adding: #include <unistd.h> to the top of the two files in those errors fixes the compiler errors. Reproducible: Didn't try Steps to Reproduce: Try to build. Expected Results: Build error free.
This problem is also present in 4.2.81 at least in the second case above (not got as far as searching for others. gcc used to include unistd.h in <iostream>, <string> and other STL headers in order to implement said headers. This was however non-standard and the offending includes have been removed starting with gcc 4.7. As a result this is a fairly important thing to fix as gcc 4.7 and beyond become the norm.
Git commit a5c0b91af133f22016adf4711e6b921d16b18a23 by Milian Wolff. Committed on 26/01/2012 at 21:51. Pushed by mwolff into branch '1.3'. add include of unistd.h for GCC 4.7 and above M +1 -0 util/dbus_socket_transformer/main.cpp http://commits.kde.org/kdevplatform/a5c0b91af133f22016adf4711e6b921d16b18a23
Git commit 456b2f8247f88f76f028a2398b72946724cc56ee by Milian Wolff. Committed on 26/01/2012 at 21:53. Pushed by mwolff into branch '4.3'. add include of unistd.h for compatibility with GCC 4.7 M +1 -0 debuggers/gdb/unittests/debugeethreads.cpp http://commits.kde.org/kdevelop/456b2f8247f88f76f028a2398b72946724cc56ee