From 4ea5b1d3b27539e8a11d7e7ef974075cf1f7e390 Mon Sep 17 00:00:00 2001
From: LN Liberda <lauren@selfisekai.rocks>
Date: Tue, 4 Nov 2025 14:57:33 +0100
Subject: [PATCH] Fix undefined __BEGIN_DECLS define.

Not sure how this worked in the first place.
---
 include/ndk/sync.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/third_party/libsync/src/include/ndk/sync.h b/third_party/libsync/src/include/ndk/sync.h
index a786d3e..2a31df6 100644
--- a/third_party/libsync/src/include/ndk/sync.h
+++ b/third_party/libsync/src/include/ndk/sync.h
@@ -30,6 +30,16 @@
 
 #include <linux/sync_file.h>
 
+#if !defined(__BEGIN_DECLS) && !defined(__END_DECLS)
+#ifdef __cplusplus
+#define __BEGIN_DECLS extern "C" {
+#define __END_DECLS }
+#else
+#define __BEGIN_DECLS
+#define __END_DECLS
+#endif
+#endif
+
 __BEGIN_DECLS
 
 #if __ANDROID_API__ >= __ANDROID_API_O__
