This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/main by this push:
new 2b6c1e337b Add byte swap definition for Android platform (#3617)
2b6c1e337b is described below
commit 2b6c1e337bc27b48b40b90bc7fe1d64e1746e3a1
Author: SunBlack <[email protected]>
AuthorDate: Mon Jan 19 07:23:07 2026 +0100
Add byte swap definition for Android platform (#3617)
---
lang/c/src/codec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lang/c/src/codec.c b/lang/c/src/codec.c
index 613a914373..176fb21d65 100644
--- a/lang/c/src/codec.c
+++ b/lang/c/src/codec.c
@@ -27,6 +27,9 @@
# elif defined(_WIN32)
# include <stdlib.h>
# define __bswap_32 _byteswap_ulong
+# elif defined(__ANDROID__)
+# include <byteswap.h>
+# define __bswap_32 bswap_32
# else
# include <byteswap.h>
# endif