Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #19 from 86423355844265459587182778/master
Browse files Browse the repository at this point in the history
Fix compilation on kernels >= 5.1
  • Loading branch information
morphis authored Jul 13, 2019
2 parents 27fd47e + 85d3854 commit 816dd4d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ sudo: false

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- bison
- flex
Expand All @@ -12,6 +14,7 @@ addons:
- debhelper
- dkms
- fakeroot
- gcc-8

env:
- KVER=4.4
Expand All @@ -22,7 +25,9 @@ env:
- KVER=4.15
- KVER=4.16
- KVER=4.17
- KVER=master
- KVER=5.0 && CC=gcc-8
- KVER=5.1 && CC=gcc-8
- KVER=master && CC=gcc-8

matrix:
allow_failures:
Expand All @@ -33,4 +38,4 @@ matrix:
env: KVER="Debian Package Building"

script:
- ./scripts/build-against-kernel.sh ${KVER}
- ./scripts/build-against-kernel.sh ${KVER} ${CC}
4 changes: 3 additions & 1 deletion binder/binder.c
Original file line number Diff line number Diff line change
Expand Up @@ -3391,7 +3391,9 @@ static void binder_vma_close(struct vm_area_struct *vma)
binder_defer_work(proc, BINDER_DEFERRED_PUT_FILES);
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
static vm_fault_t binder_vm_fault(struct vm_fault *vmf)
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
static int binder_vm_fault(struct vm_fault *vmf)
#else
static int binder_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
Expand Down
11 changes: 6 additions & 5 deletions scripts/build-against-kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -ex

KVER=${1:-master}
CC=${2:-gcc}

src_dir="../linux-${KVER}"

Expand All @@ -18,17 +19,17 @@ fi

(
cd "$src_dir" || exit 1
make allmodconfig
make prepare
make scripts
make allmodconfig CC=${CC} HOSTCC=${CC}
make prepare CC=${CC} HOSTCC=${CC}
make scripts CC=${CC} HOSTCC=${CC}
)

(
cd ashmem || exit 1
make KERNEL_SRC="../${src_dir}"
make KERNEL_SRC="../${src_dir}" CC=${CC} HOSTCC=${CC}
)

(
cd binder || exit 1
make KERNEL_SRC="../${src_dir}"
make KERNEL_SRC="../${src_dir}" CC=${CC} HOSTCC=${CC}
)

0 comments on commit 816dd4d

Please sign in to comment.