This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/49745] error: âint truncateâ redeclared as different kind of symbol
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 14 Jul 2011 11:13:19 +0000
- Subject: [Bug libstdc++/49745] error: âint truncateâ redeclared as different kind of symbol
- Auto-submitted: auto-generated
- References: <bug-49745-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49745
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-07-14 11:13:13 UTC ---
Why does gthr-posix.h even include <unistd.h>?
--- gcc/gthr-posix.h.orig 2011-07-14 11:09:00.148778460 +0000
+++ gcc/gthr-posix.h 2011-07-14 11:09:01.763786789 +0000
@@ -39,7 +39,6 @@
#endif
#include <pthread.h>
-#include <unistd.h>
typedef pthread_t __gthread_t;
typedef pthread_key_t __gthread_key_t;
The names from <pthread.h> will still be declared, but that's a LOT better than
bringing in everything from <unistd.h>
If some crufty OS needs <unistd.h> it should only be included conditionally