From d3b0b3e0b14fb3c3c4a9dd6c5d0956fdebc68698 Mon Sep 17 00:00:00 2001
From: bol-van <none@none.none>
Date: Thu, 22 May 2025 10:19:30 +0300
Subject: [PATCH] nfqws,tpws: display android in version string

---
 nfq/nfqws.c | 8 ++++++++
 tpws/tpws.c | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/nfq/nfqws.c b/nfq/nfqws.c
index 6fbcdec..16ed125 100644
--- a/nfq/nfqws.c
+++ b/nfq/nfqws.c
@@ -1681,10 +1681,18 @@ void check_dp(const struct desync_profile *dp)
 #define STRINGIFY(x) #x
 #define TOSTRING(x) STRINGIFY(x)
 #if defined(ZAPRET_GH_VER) || defined (ZAPRET_GH_HASH)
+#ifdef __ANDROID__
+#define PRINT_VER printf("github android version %s (%s)\n\n", TOSTRING(ZAPRET_GH_VER), TOSTRING(ZAPRET_GH_HASH))
+#else
 #define PRINT_VER printf("github version %s (%s)\n\n", TOSTRING(ZAPRET_GH_VER), TOSTRING(ZAPRET_GH_HASH))
+#endif
+#else
+#ifdef __ANDROID__
+#define PRINT_VER printf("self-built android version %s %s\n\n", __DATE__, __TIME__)
 #else
 #define PRINT_VER printf("self-built version %s %s\n\n", __DATE__, __TIME__)
 #endif
+#endif
 
 enum opt_indices {
 	IDX_DEBUG,
diff --git a/tpws/tpws.c b/tpws/tpws.c
index 9922a5a..baacc28 100644
--- a/tpws/tpws.c
+++ b/tpws/tpws.c
@@ -1871,10 +1871,18 @@ static const char *bindll_s[] = { "unwanted","no","prefer","force" };
 #define STRINGIFY(x) #x
 #define TOSTRING(x) STRINGIFY(x)
 #if defined(ZAPRET_GH_VER) || defined (ZAPRET_GH_HASH)
+#ifdef __ANDROID__
+#define PRINT_VER printf("github android version %s (%s)\n\n", TOSTRING(ZAPRET_GH_VER), TOSTRING(ZAPRET_GH_HASH))
+#else
 #define PRINT_VER printf("github version %s (%s)\n\n", TOSTRING(ZAPRET_GH_VER), TOSTRING(ZAPRET_GH_HASH))
+#endif
+#else
+#ifdef __ANDROID__
+#define PRINT_VER printf("self-built android version %s %s\n\n", __DATE__, __TIME__)
 #else
 #define PRINT_VER printf("self-built version %s %s\n\n", __DATE__, __TIME__)
 #endif
+#endif
 
 int main(int argc, char *argv[])
 {