forked from gnzlbg/jemallocator
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Compile pthread_atfork.c when target contains "android". 2. Use original definition of "pthread_atfork".
- Loading branch information
1 parent
19f57f2
commit fad8165
Showing
2 changed files
with
18 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
#include <stdint.h> | ||
#include <pthread.h> | ||
|
||
// These symbols are used by jemalloc on android but the really old android | ||
// we're building on doesn't have them defined, so just make sure the symbols | ||
// are available. | ||
/* | ||
* These symbols are used by jemalloc on android but the really old android | ||
* we're building on doesn't have them defined, so just make sure the symbols | ||
* are available. | ||
*/ | ||
__attribute__((weak)) int | ||
pthread_atfork(uint8_t *prefork __attribute__((unused)), | ||
uint8_t *postfork_parent __attribute__((unused)), | ||
uint8_t *postfork_child __attribute__((unused))) { | ||
pthread_atfork(void (*prepare)(void) __attribute__((unused)), | ||
void (*parent)(void) __attribute__((unused)), | ||
void (*child)(void) __attribute__((unused))) { | ||
return 0; | ||
} |