From 596f7dbebd2590f7e77cf755af46952f340ddb97 Mon Sep 17 00:00:00 2001 From: Brice Dubost Date: Sat, 25 Nov 2017 20:21:10 -0500 Subject: [PATCH] Fix compiling with kernels > 4.14 --- src/scam_common.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/scam_common.h b/src/scam_common.h index 05ee7e5..c3436de 100644 --- a/src/scam_common.h +++ b/src/scam_common.h @@ -61,6 +61,18 @@ #define MAX_STATIC_KEYS 24 +//Quick hack around the removal of ca_pid_t and CA_GET_PID in recent kernels +//https://github.com/torvalds/linux/commit/833ff5e7feda1a042b83e82208cef3d212ca0ef1 +#ifndef CA_SET_PID +typedef struct ca_pid { + unsigned int pid; + int index; /* -1 == disable*/ + } ca_pid_t; +//We should not be able to get it so a number that is unlikely to happen +#define CA_SET_PID 42424242 +#endif + + /** @brief the parameters for the scam * This structure contain the parameters needed for the SCAM */ -- 2.19.1