summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Brink2019-05-23 19:49:04 -0700
committerJames Brink2019-05-23 19:49:04 -0700
commit4dc2fc7ef5dde25707ad521a830b9161c6e400b7 (patch)
tree587a6d108d6a8573040a5bf5d91fc1416b9dfe1b
parent4092c2b86813546a504203520adc3039afcf8cac (diff)
downloadaur-4dc2fc7ef5dde25707ad521a830b9161c6e400b7.tar.gz
Fix build for kernels >= 5.1
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD9
-rw-r--r--linux-5.1.patch25
3 files changed, 35 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 19b7a7aad1f..91567b7a917 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = darling-git
pkgdesc = Darwin/macOS emulation layer for Linux
- pkgver = r2532.c690cac7
+ pkgver = r2535.9abed516
pkgrel = 1
url = http://www.darlinghq.org
arch = x86_64
@@ -40,6 +40,7 @@ pkgbase = darling-git
depends = libunwind
options = !buildflags
source = dkms.conf
+ source = linux-5.1.patch
source = git+https://github.com/darlinghq/darling.git
source = git+https://github.com/darlinghq/darling-DSTools.git
source = git+https://github.com/darlinghq/darling-DirectoryService.git
@@ -138,6 +139,7 @@ pkgbase = darling-git
source = git+https://github.com/darlinghq/darling-zsh.git
source = git+https://github.com/darlinghq/darling-newlkm.git
md5sums = d6d3b392245a45c6fb5f82037bfdbd19
+ md5sums = 5349a07c2b26caa1220929878adcecad
md5sums = SKIP
md5sums = SKIP
md5sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 6f6fc5a563e..4f7ed67018f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
_gitname=darling
pkgbase=$_gitname-git
pkgname=('darling-git' 'darling-mach-dkms-git')
-pkgver=r2532.c690cac7
+pkgver=r2535.9abed516
pkgrel=1
pkgdesc="Darwin/macOS emulation layer for Linux"
arch=('x86_64')
@@ -19,6 +19,7 @@ _make_depends_x86_64=('gcc-multilib')
# Darling git repo and all submodules.
source=('dkms.conf'
+ 'linux-5.1.patch'
'git+https://github.com/darlinghq/darling.git'
'git+https://github.com/darlinghq/darling-DSTools.git'
'git+https://github.com/darlinghq/darling-DirectoryService.git'
@@ -118,7 +119,7 @@ source=('dkms.conf'
'git+https://github.com/darlinghq/darling-newlkm.git')
# We skip md5 on all git repos
-md5sums=('d6d3b392245a45c6fb5f82037bfdbd19'
+md5sums=('d6d3b392245a45c6fb5f82037bfdbd19' '5349a07c2b26caa1220929878adcecad'
'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP'
'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP'
'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP'
@@ -246,6 +247,10 @@ prepare() {
echo "Creating build directory."
mkdir -pv "build"
+
+ echo "Patching LKM for linux 5.1"
+ cd "$srcdir/darling/src/lkm"
+ patch -p1 < "$srcdir"/linux-5.1.patch
}
build() {
diff --git a/linux-5.1.patch b/linux-5.1.patch
new file mode 100644
index 00000000000..a0dedcf9d6c
--- /dev/null
+++ b/linux-5.1.patch
@@ -0,0 +1,25 @@
+diff --git a/darling/binfmt.c b/darling/binfmt.c
+index 4945e87..7b0b886 100644
+--- a/darling/binfmt.c
++++ b/darling/binfmt.c
+@@ -31,6 +31,7 @@
+ #endif
+
+ #include <linux/mm.h>
++#include <linux/mman.h>
+ #include <linux/slab.h>
+ #include <linux/fs.h>
+ #include <linux/file.h>
+diff --git a/darling/traps.c b/darling/traps.c
+index be0aecb..05c707c 100644
+--- a/darling/traps.c
++++ b/darling/traps.c
+@@ -385,7 +385,7 @@ static void darling_ipc_inherit(task_t old_task, task_t new_task)
+
+ // No vma from 4.11
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+-static int mach_mmap_fault(struct vm_fault *vmf)
++static vm_fault_t mach_mmap_fault(struct vm_fault *vmf)
+ #else
+ static int mach_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+ #endif