Fredrik Fornwall
6 years ago
6 changed files with 76 additions and 29 deletions
@ -1,11 +0,0 @@ |
|||
--- ../cache/vifm-0.9/src/compat/pthread.c 2017-06-18 14:31:25.000000000 +0000
|
|||
+++ ./src/compat/pthread.c 2017-10-03 23:43:21.948484280 +0000
|
|||
@@ -18,7 +18,7 @@
|
|||
|
|||
#include "pthread.h" |
|||
|
|||
-#ifdef __APPLE__
|
|||
+#ifdef __ANDROID__
|
|||
|
|||
#include <assert.h> /* assert() */ |
|||
#include <errno.h> /* EBUSY */ |
@ -1,11 +0,0 @@ |
|||
--- ../cache/vifm-0.9/src/compat/pthread.h 2017-06-18 14:31:25.000000000 +0000
|
|||
+++ ./src/compat/pthread.h 2017-10-03 23:46:10.528479414 +0000
|
|||
@@ -21,7 +21,7 @@
|
|||
|
|||
#include <pthread.h> |
|||
|
|||
-#ifdef __APPLE__
|
|||
+#ifdef __ANDROID__
|
|||
|
|||
typedef int pthread_spinlock_t; |
|||
|
@ -0,0 +1,21 @@ |
|||
diff -u -r ../vifm-0.10/src/registers.c ./src/registers.c
|
|||
--- ../vifm-0.10/src/registers.c 2018-11-11 15:20:19.000000000 +0000
|
|||
+++ ./src/registers.c 2018-11-17 21:30:58.649771651 +0000
|
|||
@@ -109,7 +109,7 @@
|
|||
* not constant here only to allow enalbing a test mode with smaller values to |
|||
* test corner cases. |
|||
*/ |
|||
-#ifdef __linux__
|
|||
+#if defined(__linux__) && !defined(__ANDROID__)
|
|||
/* |
|||
* On Linux a mmap call can map more bytes than the size of the underlying |
|||
* object. Thus the area mapped can be 128 MiB (very large) and the memory |
|||
@@ -829,7 +829,7 @@
|
|||
regs_sync_enable_test_mode(void) |
|||
{ |
|||
debug_print_to_stdout = 1; |
|||
-#ifdef __linux__
|
|||
+#if defined(__linux__) && !defined(__ANDROID__)
|
|||
shared_mmap_bytes = 1024 * 32; |
|||
shared_initial = 1024 * 4; /* still larger than metadata size */ |
|||
#else |
@ -0,0 +1,47 @@ |
|||
diff -u -r ../vifm-0.10/src/utils/shmem_nix.c ./src/utils/shmem_nix.c
|
|||
--- ../vifm-0.10/src/utils/shmem_nix.c 2018-11-11 15:20:19.000000000 +0000
|
|||
+++ ./src/utils/shmem_nix.c 2018-11-17 21:37:18.757403620 +0000
|
|||
@@ -41,6 +41,9 @@
|
|||
shmem_t * |
|||
shmem_create(const char name[], size_t initial_size, size_t max_size) |
|||
{ |
|||
+#ifdef __ANDROID__
|
|||
+ return NULL;
|
|||
+#else
|
|||
int error_other; |
|||
int error_excl_already_exists; |
|||
int error_normal_does_not_exist; |
|||
@@ -135,21 +138,25 @@
|
|||
} |
|||
|
|||
return shmem; |
|||
+#endif
|
|||
} |
|||
|
|||
void |
|||
shmem_destroy(shmem_t *shmem) |
|||
{ |
|||
+#ifndef __ANDROID__
|
|||
if(shmem != NULL) |
|||
{ |
|||
shm_unlink(shmem->name); |
|||
shmem_free(shmem); |
|||
} |
|||
+#endif
|
|||
} |
|||
|
|||
void |
|||
shmem_free(shmem_t *shmem) |
|||
{ |
|||
+#ifndef __ANDROID__
|
|||
if(shmem == NULL) |
|||
{ |
|||
return; |
|||
@@ -163,6 +170,7 @@
|
|||
close(shmem->fd); |
|||
free(shmem->name); |
|||
free(shmem); |
|||
+#endif
|
|||
} |
|||
|
|||
int |
Loading…
Reference in new issue