Use __atomic_fetch_{add,and,or,sub,xor} instead of __atomic_{add,and,or,sub,xor}_fetch adding the necessary code to allow consumption of the resulting value.
Signed-off-by: Tyler Retzlaff <roret...@linux.microsoft.com> --- lib/ipsec/ipsec_sqn.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ipsec/ipsec_sqn.h b/lib/ipsec/ipsec_sqn.h index 2636cb1..505950e 100644 --- a/lib/ipsec/ipsec_sqn.h +++ b/lib/ipsec/ipsec_sqn.h @@ -128,7 +128,7 @@ n = *num; if (SQN_ATOMIC(sa)) - sqn = __atomic_add_fetch(&sa->sqn.outb, n, __ATOMIC_RELAXED); + sqn = __atomic_fetch_add(&sa->sqn.outb, n, __ATOMIC_RELAXED) + n; else { sqn = sa->sqn.outb + n; sa->sqn.outb = sqn; -- 1.8.3.1