Skip to content

Fix build break when building with Google native client tool chain. #195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Zend/zend_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size ZEND_

static inline unsigned int zend_mm_high_bit(size_t _size)
{
#if defined(__GNUC__) && defined(i386)
#if defined(__GNUC__) && (defined(__native_client__) || defined(i386))
unsigned int n;

__asm__("bsrl %1,%0\n\t" : "=r" (n) : "rm" (_size));
Expand All @@ -690,7 +690,7 @@ static inline unsigned int zend_mm_high_bit(size_t _size)

static inline unsigned int zend_mm_low_bit(size_t _size)
{
#if defined(__GNUC__) && defined(i386)
#if defined(__GNUC__) && (defined(__native_client__) || defined(i386))
unsigned int n;

__asm__("bsfl %1,%0\n\t" : "=r" (n) : "rm" (_size));
Expand Down Expand Up @@ -2454,7 +2454,7 @@ ZEND_API size_t _zend_mem_block_size(void *ptr TSRMLS_DC ZEND_FILE_LINE_DC ZEND_
return _zend_mm_block_size(AG(mm_heap), ptr ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}

#if defined(__GNUC__) && defined(i386)
#if defined(__GNUC__) && (defined(__native_client__) || defined(i386))

static inline size_t safe_address(size_t nmemb, size_t size, size_t offset)
{
Expand Down