new file mode 100644
@@ -0,0 +1,33 @@
+From a9f28a44b9b387ef28904e24ca05d28562fdcc45 Mon Sep 17 00:00:00 2001
+From: Frede Hoey Braendstrup <frede@vokalo.io>
+Date: Mon, 26 Jan 2026 11:07:24 +0100
+Subject: [PATCH] fix(clang): curl_easy_setopt takes a long not an int
+
+Signed-off-by: Frede Hoey Braendstrup <frede@vokalo.io>
+Upstream-Status: Backport [https://github.com/OpenIDC/liboauth2/pull/69]
+---
+ src/http.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/http.c b/src/http.c
+index ab7a25a..bc242ed 100644
+--- a/src/http.c
++++ b/src/http.c
+@@ -1024,7 +1024,7 @@ bool oauth2_http_call(oauth2_log_t *log, const char *url, const char *data,
+ curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 5L);
+
+ if (ctx)
+- curl_easy_setopt(curl, CURLOPT_TIMEOUT, ctx->timeout);
++ curl_easy_setopt(curl, CURLOPT_TIMEOUT, (long)ctx->timeout);
+
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
+ oauth2_http_curl_buf_write);
+@@ -1092,7 +1092,7 @@ bool oauth2_http_call(oauth2_log_t *log, const char *url, const char *data,
+
+ if (data != NULL) {
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
+- curl_easy_setopt(curl, CURLOPT_POST, 1);
++ curl_easy_setopt(curl, CURLOPT_POST, 1L);
+ }
+
+ if (ctx)
new file mode 100644
@@ -0,0 +1,23 @@
+SUMMARY = "OAuth 2.x and OpenID Connect C library"
+HOMEPAGE = "https://github.com/OpenIDC/liboauth2"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
+
+SRC_URI = " \
+ git://github.com/OpenIDC/liboauth2;protocol=https;branch=master;tag=v${PV} \
+ file://0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch \
+ "
+
+PV = "2.2.0"
+SRCREV = "12571b6d6568c2db7d5f080f60ecb55795c0db19"
+
+DEPENDS = "libpcre2 jansson curl openssl cjose"
+
+inherit pkgconfig autotools-brokensep
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[memcache] = "--with-memcache,--without-memcache,libmemcached"
+PACKAGECONFIG[redis] = "--with-redis,--without-redis,hiredis"
+PACKAGECONFIG[jq] = "--with-jq,--without-jq,jq"
+PACKAGECONFIG[apache] = "--with-apache,--without-apache,apache2"
+
V3: adds fixes for building with clang V4: removes default PACKAGECONFIG used for testing builds V5: fixes Upstream-Status in patch Signed-off-by: Frede Hoey Braendstrup <frederikbraendstrup@gmail.com> --- ..._easy_setopt-takes-a-long-not-an-int.patch | 33 +++++++++++++++++++ .../liboauth2/liboauth2_2.2.0.bb | 23 +++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 meta-oe/recipes-support/liboauth2/liboauth2/0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch create mode 100644 meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb