load c module example

This commit is contained in:
iddoeldor 2020-06-21 18:32:49 +03:00 committed by GitHub
parent b3e40c2b57
commit 0804545271
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,7 +168,7 @@ $ ./aarch64-linux-android21-clang /tmp/b.c -o /tmp/a -shared ../sysroot/usr/lib/
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__) #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__)
void test(void) { void test(void) {
FILE* fp = popen("ls -l /proc/self/fd 2>&1", "r"); FILE* fp = popen("ls -l /sdcard 2>&1", "r");
if (fp == NULL) if (fp == NULL)
LOGE("executing cmd failed"); LOGE("executing cmd failed");
char b[256]; char b[256];