summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerwincoumans <erwin.coumans@gmail.com>2022-03-05 13:51:34 -0800
committerGitHub <noreply@github.com>2022-03-05 13:51:34 -0800
commitb74bdfbbcfb887c0d511adaa94eed3034f5ddaa1 (patch)
treeb45852c75448080dfa6dae9a11da81c08be410a4
parent0c40b73b0ec90c275128530317ac7cc83bc82240 (diff)
parent187b2bbc68714cc5f04b62d5d960e688e1c7769a (diff)
downloadbullet3-b74bdfbbcfb887c0d511adaa94eed3034f5ddaa1.tar.gz
Merge pull request #4187 from asuka-mio/master
fix build with bionic c
-rw-r--r--examples/OpenGLWindow/X11OpenGLWindow.cpp2
-rw-r--r--examples/SharedMemory/PosixSharedMemory.cpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/examples/OpenGLWindow/X11OpenGLWindow.cpp b/examples/OpenGLWindow/X11OpenGLWindow.cpp
index f3aa1fe6a..3d7e4de65 100644
--- a/examples/OpenGLWindow/X11OpenGLWindow.cpp
+++ b/examples/OpenGLWindow/X11OpenGLWindow.cpp
@@ -566,7 +566,7 @@ void X11OpenGLWindow::enableOpenGL()
//Access pthreads as a workaround for a bug in Linux/Ubuntu
//See https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-319/+bug/1248642
-#if !defined(__NetBSD__)
+#if !defined(__NetBSD__) && !defined(__ANDROID__)
int i = pthread_getconcurrency();
printf("pthread_getconcurrency()=%d\n", i);
#endif
diff --git a/examples/SharedMemory/PosixSharedMemory.cpp b/examples/SharedMemory/PosixSharedMemory.cpp
index 00bcf7584..dac21eeb4 100644
--- a/examples/SharedMemory/PosixSharedMemory.cpp
+++ b/examples/SharedMemory/PosixSharedMemory.cpp
@@ -8,6 +8,11 @@
#define TEST_SHARED_MEMORY
#endif //_WIN32
+//Shmem not available on target api < 26
+#if defined(__ANDROID_API__) && (__ANDROID_API__ < 26)
+#undef TEST_SHARED_MEMORY
+#endif //__ANDROID__
+
#include <stddef.h>
#ifdef TEST_SHARED_MEMORY