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

Commit

Permalink
Fix compilation on kernels >= 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Anonymous committed May 12, 2019
1 parent 27fd47e commit ae35b8d
Showing 1 changed file with 3 additions and 1 deletion.
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

6 comments on commit ae35b8d

@totedati
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is working to me. Ubuntu 18.04 and non-standard kernel v5.2.8 installed with ukuu utility. Now you need to push this patch to ppa, is still not here and many users get confused!

@TheOneWithTheBraid
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please publish this! In my Linux Distro using the most current HEAD from kernel repository, I had to re-build the packages for Anbox.

@TheOneWithTheBraid
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General question: Why is it required to check the kernel version? Couldn't we just try to compile the modules regardless of the kernel version? If the kernel was incompatible, it would crash. Then we knew the used kernel version is incompatible...

@TheOneWithTheBraid
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And could you update the PPA?

@Thatoo
Copy link

@Thatoo Thatoo commented on ae35b8d Apr 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes please, update ppa @morphis

@nthacks
Copy link

@nthacks nthacks commented on ae35b8d Jun 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @morphis please do update the PPA, otherwise one has to keep patching and rebuilding after every apt-get install or upgrade.
It would also help to have a release file available for focal (20.04) since it is not available in every kernel (even though it is said to be available by default)

Please sign in to comment.