1 parent d7e3b36 commit 74d0df7Copy full SHA for 74d0df7
1 file changed
unix/mpconfigport.h
@@ -198,6 +198,16 @@ void mp_unix_mark_exec(void);
198
#define MICROPY_PLAT_DEV_MEM (1)
199
#endif
200
201
+#ifdef __ANDROID__
202
+#include <android/api-level.h>
203
+#if __ANDROID_API__ < 4
204
+// Bionic libc in Android 1.5 misses these 2 functions
205
+// 1.442695040888963407354163704 is 1/_M_LN2
206
+#define log2(x) (log(x) * 1.442695040888963407354163704)
207
+#define nan(x) NAN
208
+#endif
209
210
+
211
extern const struct _mp_obj_fun_builtin_t mp_builtin_input_obj;
212
extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj;
213
#define MICROPY_PORT_BUILTINS \
0 commit comments