[Buildroot] [PATCH 1/1] package/earlyoom: fix build with kernel < 4.3

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Jul 28 20:51:49 UTC 2022


On Thu, 28 Jul 2022 10:14:18 +0200
Fabrice Fontaine <fontaine.fabrice at gmail.com> wrote:

> PR_CAP_AMBIENT is only available since kernel 4.3 and
> https://github.com/torvalds/linux/commit/58319057b7847667f0c9585b9de0e8932b0fdb08
> resulting in the following build failure since bump to version 1.7 in
> commit 07b7f88668b1e51e3d17e14bd8795ef042df144e and
> https://github.com/rfjakob/earlyoom/commit/9edc5cfc9ad794ed59baec5e6ee8d1060456a315:
> 
> main.c: In function 'main':
> main.c:119:11: error: 'PR_CAP_AMBIENT' undeclared (first use in this function)
>      prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL, 0, 0, 0);
>            ^
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/5a0ad7e1f6de3c37e40c37d8f583fc699a457753
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
> ---
>  ...001-main.c-fix-build-with-kernel-4.3.patch | 45 +++++++++++++++++++
>  1 file changed, 45 insertions(+)
>  create mode 100644 package/earlyoom/0001-main.c-fix-build-with-kernel-4.3.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the buildroot mailing list