diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2018-10-01 10:26:57 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-10-02 10:00:48 +0200 |
commit | bd7804487bd6a9aad3cbe939bcaa44fbffcaa869 (patch) | |
tree | fb58618be51f2d4dfb93c3a8ce764aa1974530c3 | |
parent | 17729e9df07335db33bdcd3d89c1bbe2b2c004bc (diff) |
backport: check Ubuntu kernel for u64_stats_update_begin_irqsave()
Ubuntu cherry-picked the patch that added
u64_stat_update_begin_irqsave() in their 4.15 kernel, so we get a
redefinition compilation error if we try to compile against that.
To solve this, check UTS_UBUNTU_RELEASE_ABI and don't define our
backported function if it's 33 or higher.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | backport/backport-include/linux/u64_stats_sync.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backport/backport-include/linux/u64_stats_sync.h b/backport/backport-include/linux/u64_stats_sync.h index 0d221238..251373a7 100644 --- a/backport/backport-include/linux/u64_stats_sync.h +++ b/backport/backport-include/linux/u64_stats_sync.h @@ -152,7 +152,8 @@ static inline bool u64_stats_fetch_retry_irq(const struct u64_stats_sync *syncp, #endif /* LINUX_VERSION_IS_LESS(3,13,0) */ #if LINUX_VERSION_IS_LESS(4,16,0) && \ - !LINUX_VERSION_IN_RANGE(4,14,44, 4,15,0) + !LINUX_VERSION_IN_RANGE(4,14,44, 4,15,0) && \ + !(LINUX_VERSION_IS_GEQ(4,15,18) && UTS_UBUNTU_RELEASE_ABI >= 33) static inline unsigned long u64_stats_update_begin_irqsave(struct u64_stats_sync *syncp) { |