void-packages/srcpkgs/firefox-esr/patches/fix-webrtc-glibcisms.patch

24 lines
679 B
Diff

--- media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c 2019-02-01 00:49:18.472382771 +0100
+++ - 2019-02-01 00:50:25.928007236 +0100
@@ -11,7 +11,10 @@
#include <stdlib.h>
#include <string.h>
#include <features.h>
-#if __GLIBC_PREREQ(2, 16)
+#ifndef __GLIBC_PREREQ
+#define __GLIBC_PREREQ(a, b) 0
+#endif
+#if !__GLIBC__ || __GLIBC_PREREQ(2, 16)
#include <sys/auxv.h>
#else
#include <fcntl.h>
@@ -29,7 +32,7 @@
int architecture = 0;
unsigned long hwcap = 0;
const char* platform = NULL;
-#if __GLIBC_PREREQ(2, 16)
+#if !__GLIBC__ || __GLIBC_PREREQ(2, 16)
hwcap = getauxval(AT_HWCAP);
platform = (const char*)getauxval(AT_PLATFORM);
#else