Source: webrtc-audio-processing
Version: 0.3-1
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd, kfreebsd
Hi,
webrtc-audio-processing fails to build on GNU/Hurd and GNU/kFreeBSD due
to missing $host cases for Hurd and kFreeBSD, with the corresponding
changes in the file webrtc/base/platform_thread.cc. The attached patch,
non-linux.patch fixes the build problems for both Hurd and kFreeBSD.
Build tested on hurd-i386 and kfreebsd-i386.
Thanks!
Index: webrtc-audio-processing-0.3/configure.ac
===================================================================
--- webrtc-audio-processing-0.3.orig/configure.ac
+++ webrtc-audio-processing-0.3/configure.ac
@@ -44,6 +44,11 @@ AS_CASE(["${host}"],
OS_CFLAGS="-DWEBRTC_LINUX"
PLATFORM_CFLAGS="-DWEBRTC_POSIX"
],
+ [*-k*bsd-gnu* | *-*gnu*],
+ [
+ OS_CFLAGS="-DWEBRTC_NONLINUX"
+ PLATFORM_CFLAGS="-DWEBRTC_POSIX"
+ ],
[*-*darwin*],
[
AS_IF([test "$HAVE_IOS" = "yes"],
Index: webrtc-audio-processing-0.3/webrtc/base/platform_thread.cc
===================================================================
--- webrtc-audio-processing-0.3.orig/webrtc/base/platform_thread.cc
+++ webrtc-audio-processing-0.3/webrtc/base/platform_thread.cc
@@ -17,6 +17,8 @@
#if defined(WEBRTC_LINUX)
#include <sys/prctl.h>
#include <sys/syscall.h>
+#elif defined(WEBRTC_NONLINUX)
+#include <sys/syscall.h>
#endif
namespace rtc {
@@ -32,6 +34,8 @@ PlatformThreadId CurrentThreadId() {
ret = syscall(__NR_gettid);
#elif defined(WEBRTC_ANDROID)
ret = gettid();
+#elif defined(WEBRTC_NONLINUX)
+ ret = reinterpret_cast<pthread_t>(pthread_self());
#else
// Default implementation for nacl and solaris.
ret = reinterpret_cast<pid_t>(pthread_self());