mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-25 12:15:32 +03:00
192 lines
6.3 KiB
Diff
192 lines
6.3 KiB
Diff
--- ./third_party/lss/linux_syscall_support.h
|
|
+++ ./third_party/lss/linux_syscall_support.h
|
|
@@ -1239,6 +1239,12 @@
|
|
#ifndef __NR_fallocate
|
|
#define __NR_fallocate 285
|
|
#endif
|
|
+
|
|
+#undef __NR_pread
|
|
+#define __NR_pread __NR_pread64
|
|
+#undef __NR_pwrite
|
|
+#define __NR_pwrite __NR_pwrite64
|
|
+
|
|
/* End of x86-64 definitions */
|
|
#elif defined(__mips__)
|
|
#if _MIPS_SIM == _MIPS_SIM_ABI32
|
|
--- ./sandbox/linux/suid/process_util.h
|
|
+++ ./sandbox/linux/suid/process_util.h
|
|
@@ -12,6 +12,14 @@
|
|
#include <stdint.h>
|
|
#include <sys/types.h>
|
|
|
|
+// Some additional functions
|
|
+# define TEMP_FAILURE_RETRY(expression) \
|
|
+ (__extension__ \
|
|
+ ({ long int __result; \
|
|
+ do __result = (long int) (expression); \
|
|
+ while (__result == -1L && errno == EINTR); \
|
|
+ __result; }))
|
|
+
|
|
// This adjusts /proc/process/oom_score_adj so the Linux OOM killer
|
|
// will prefer certain process types over others. The range for the
|
|
// adjustment is [-1000, 1000], with [0, 1000] being user accessible.
|
|
--- ./sandbox/linux/seccomp-bpf/trap.cc
|
|
+++ ./sandbox/linux/seccomp-bpf/trap.cc
|
|
@@ -168,7 +168,7 @@
|
|
// most versions of glibc don't include this information in siginfo_t. So,
|
|
// we need to explicitly copy it into a arch_sigsys structure.
|
|
struct arch_sigsys sigsys;
|
|
- memcpy(&sigsys, &info->_sifields, sizeof(sigsys));
|
|
+ memcpy(&sigsys, &info->__si_fields, sizeof(sigsys));
|
|
|
|
#if defined(__mips__)
|
|
// When indirect syscall (syscall(__NR_foo, ...)) is made on Mips, the
|
|
--- ./third_party/ffmpeg/libavutil/cpu.c
|
|
+++ ./third_party/ffmpeg/libavutil/cpu.c
|
|
@@ -41,7 +41,6 @@
|
|
#include <sys/param.h>
|
|
#endif
|
|
#include <sys/types.h>
|
|
-#include <sys/sysctl.h>
|
|
#endif
|
|
#if HAVE_UNISTD_H
|
|
#include <unistd.h>
|
|
--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
|
|
+++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
|
|
@@ -46,7 +46,9 @@
|
|
#endif // defined(OS_ANDROID) && defined(__arm__)
|
|
|
|
#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
|
+#if defined(__GLIBC__)
|
|
#include <gnu/libc-version.h>
|
|
+#endif
|
|
|
|
#include "base/linux_util.h"
|
|
#include "base/strings/string_split.h"
|
|
@@ -365,7 +367,7 @@ void RecordLinuxDistro() {
|
|
#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
|
|
|
void RecordLinuxGlibcVersion() {
|
|
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
|
+#if defined(__GLIBC__) && !defined(OS_CHROMEOS)
|
|
base::Version version(gnu_get_libc_version());
|
|
|
|
UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE;
|
|
--- ./base/logging.cc
|
|
+++ ./base/logging.cc
|
|
@@ -621,8 +621,7 @@
|
|
|
|
LogMessage::~LogMessage() {
|
|
size_t stack_start = stream_.tellp();
|
|
-#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \
|
|
- !defined(OS_AIX)
|
|
+#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__)
|
|
if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) {
|
|
// Include a stack trace on a fatal, unless a debugger is attached.
|
|
base::debug::StackTrace stack_trace;
|
|
--- ./net/dns/dns_config_service_posix.cc
|
|
+++ ./net/dns/dns_config_service_posix.cc
|
|
@@ -150,7 +150,7 @@
|
|
#if !defined(OS_ANDROID)
|
|
ConfigParsePosixResult result;
|
|
// TODO(fuchsia): Use res_ninit() when it's implemented on Fuchsia.
|
|
-#if defined(OS_OPENBSD) || defined(OS_FUCHSIA)
|
|
+#if defined(OS_OPENBSD) || defined(OS_FUCHSIA) || defined(_GNU_SOURCE)
|
|
// Note: res_ninit in glibc always returns 0 and sets RES_INIT.
|
|
// res_init behaves the same way.
|
|
memset(&_res, 0, sizeof(_res));
|
|
--- base/native_library_posix.cc
|
|
+++ base/native_library_posix.cc
|
|
@@ -12,6 +12,10 @@
|
|
#include "base/strings/utf_string_conversions.h"
|
|
#include "base/threading/scoped_blocking_call.h"
|
|
|
|
+#ifndef RTLD_DEEPBIND
|
|
+#define RTLD_DEEPBIND 0
|
|
+#endif
|
|
+
|
|
namespace base {
|
|
|
|
std::string NativeLibraryLoadError::ToString() const {
|
|
--- ./third_party/blink/renderer/platform/wtf/stack_util.cc
|
|
+++ ./third_party/blink/renderer/platform/wtf/stack_util.cc
|
|
@@ -29,7 +29,7 @@
|
|
// FIXME: On Mac OSX and Linux, this method cannot estimate stack size
|
|
// correctly for the main thread.
|
|
|
|
-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
|
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
|
defined(OS_FUCHSIA)
|
|
// pthread_getattr_np() can fail if the thread is not invoked by
|
|
// pthread_create() (e.g., the main thread of blink_unittests).
|
|
@@ -97,7 +97,7 @@
|
|
}
|
|
|
|
void* GetStackStart() {
|
|
-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
|
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
|
defined(OS_FUCHSIA)
|
|
pthread_attr_t attr;
|
|
int error;
|
|
--- third_party/lss/linux_syscall_support.h
|
|
+++ third_party/lss/linux_syscall_support.h
|
|
@@ -132,15 +132,18 @@
|
|
|
|
/* The Android NDK's <sys/stat.h> #defines these macros as aliases
|
|
* to their non-64 counterparts. To avoid naming conflict, remove them. */
|
|
-#ifdef __ANDROID__
|
|
+#if defined(fstat64)
|
|
/* These are restored by the corresponding #pragma pop_macro near
|
|
* the end of this file. */
|
|
# pragma push_macro("stat64")
|
|
# pragma push_macro("fstat64")
|
|
+# pragma push_macro("fstatat64")
|
|
# pragma push_macro("lstat64")
|
|
# undef stat64
|
|
# undef fstat64
|
|
+# undef fstatat64
|
|
# undef lstat64
|
|
+# define __RESTORE_MACRO 1
|
|
#endif
|
|
|
|
#if defined(__ANDROID__) && defined(__x86_64__)
|
|
@@ -4517,12 +4518,14 @@
|
|
# endif
|
|
#endif
|
|
|
|
-#ifdef __ANDROID__
|
|
+#ifdef __RESTORE_MACRO
|
|
/* These restore the original values of these macros saved by the
|
|
* corresponding #pragma push_macro near the top of this file. */
|
|
# pragma pop_macro("stat64")
|
|
# pragma pop_macro("fstat64")
|
|
+# pragma pop_macro("fstatat64")
|
|
# pragma pop_macro("lstat64")
|
|
+#undef __RESTORE_MACRO
|
|
#endif
|
|
|
|
#if defined(__cplusplus) && !defined(SYS_CPLUSPLUS)
|
|
--- third_party/crashpad/crashpad/util/linux/ptracer.cc
|
|
+++ third_party/crashpad/crashpad/util/linux/ptracer.cc
|
|
@@ -28,6 +28,10 @@
|
|
#include <asm/ldt.h>
|
|
#endif
|
|
|
|
+#if defined(ARCH_CPU_ARM_FAMILY)
|
|
+#include <asm/ptrace.h>
|
|
+#endif
|
|
+
|
|
namespace crashpad {
|
|
|
|
namespace {
|
|
--- third_party/crashpad/crashpad/util/linux/thread_info.h
|
|
+++ third_party/crashpad/crashpad/util/linux/thread_info.h
|
|
@@ -273,7 +273,7 @@
|
|
"Size mismatch");
|
|
#elif defined(ARCH_CPU_ARMEL)
|
|
static_assert(sizeof(f32_t::fpregs) == sizeof(user_fpregs), "Size mismatch");
|
|
-#if !defined(__GLIBC__)
|
|
+#if !defined(__linux__)
|
|
static_assert(sizeof(f32_t::vfp) == sizeof(user_vfp), "Size mismatch");
|
|
#endif
|
|
#elif defined(ARCH_CPU_ARM64)
|