Quellcode durchsuchen

Fix compile on sytems using libc++ instead of libstdc++

libc++ does not really implement __gnu_cxx namespace and it
compiles fine without this namespace, therefore detect libc++
and if it is used them exclude this namespace

See https://github.com/stressapptest/stressapptest/issues/47

Fixes

./sattypes.h:33:17: error: expected namespace name
using namespace __gnu_cxx; //NOLINT

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj vor 6 Jahren
Ursprung
Commit
8070b63792
1 geänderte Dateien mit 2 neuen und 0 gelöschten Zeilen
  1. 2 0
      src/sattypes.h

+ 2 - 0
src/sattypes.h

@@ -30,7 +30,9 @@
 #include "stressapptest_config_android.h"  // NOLINT
 #else
 #include "stressapptest_config.h"  // NOLINT
+#ifndef _LIBCPP_VERSION
 using namespace __gnu_cxx;  //NOLINT
+#endif  // _LIBCPP_VERSION
 #endif  // __ANDROID__
 using namespace std;