Permalink
Browse files

Integrated patch from YunQiang Su, fixed FTBFS with gcc-4.7

  • Loading branch information...
1 parent e1fe9bc commit 3d35aa0370d9c7bd455098caa9ba22ebe1f82968 @yongsun yongsun committed Apr 4, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −1 SConstruct
  2. +2 −3 src/portability.h
View
@@ -313,7 +313,8 @@ def DoConfigure():
conf.CheckCHeader('sys/param.h')
conf.CheckCHeader('sys/stat.h')
conf.CheckCHeader('sys/types.h')
- conf.CheckCHeader('unistd.h')
+ if conf.CheckCHeader('unistd.h'):
+ conf.Define('DHAVE_UNISTD_H', 1)
conf.CheckCHeader('wchar.h')
# add essential package requirements
View
@@ -44,15 +44,14 @@
#include <string>
#include <cstring>
-#if defined(sun)
+#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#ifdef __cplusplus
#include <algorithm>
#else
#include <sys/ddi.h>
#endif //__cpluscplus
-#endif //defined(sun)
-
+#endif //defined(HAVE_UNISTD_H)
#ifndef HOST_OS_GNUC_2
#if defined(DEBUG) && !defined(NDEBUG)

0 comments on commit 3d35aa0

Please sign in to comment.