aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2025-05-06 22:29:46 +0800
committerPo Lu2025-05-06 22:29:46 +0800
commitfa05cfd4455f2883d16992e5f1323a8945956987 (patch)
tree679ddece08adf586b3dd5e205a572186ddc257c2 /src
parent852d50ecfcfa505ca245be8d82123b27cc967f73 (diff)
downloademacs-fa05cfd4455f2883d16992e5f1323a8945956987.tar.gz
emacs-fa05cfd4455f2883d16992e5f1323a8945956987.zip
Fix compilation on Android 35 and on Termux
* configure.ac (gl_cv_onwards_func_tzalloc): Define to "future OS version" on Android API 35 and later. Detect posix_spawn* by means of gl_CHECK_FUNCS_ANDROID. * src/conf_post.h (tzalloc, tzfree): Define to non-conflicting names on Android 35 and later.
Diffstat (limited to 'src')
-rw-r--r--src/conf_post.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/conf_post.h b/src/conf_post.h
index 6be76d5481a..7b6c2bc933b 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -395,3 +395,14 @@ extern int emacs_setenv_TZ (char const *);
395 : S_ISCHR (mode) ? DT_CHR : S_ISFIFO (mode) ? DT_FIFO \ 395 : S_ISCHR (mode) ? DT_CHR : S_ISFIFO (mode) ? DT_FIFO \
396 : S_ISSOCK (mode) ? DT_SOCK : DT_UNKNOWN) 396 : S_ISSOCK (mode) ? DT_SOCK : DT_UNKNOWN)
397#endif /* MSDOS */ 397#endif /* MSDOS */
398
399#if defined __ANDROID__ && __ANDROID_API__ >= 35
400#define _GL_TIME_H
401#include <time.h>
402#undef _GL_TIME_H
403
404/* Redefine tzalloc and tzfree so as not to conflict with their
405 system-provided versions, which are incompatible. */
406#define tzalloc rpl_tzalloc
407#define tzfree rpl_tzfree
408#endif /* defined __ANDROID__ && __ANDROID_API__ >= 35 */