Ignore:
Timestamp:
Jun 16, 2008, 6:29:21 AM (17 years ago)
Author:
Simon Hausmann
Message:

2008-06-16 Adriaan de Groot <[email protected]>

Reviewed by Simon.

Fix compilation on Solaris

On some systems, munmap takes a char* instead of a void* (contrary to POSIX and
Single Unix Specification). Since you can always convert from char* to void*
but not vice-versa, do the casting to char*.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/collector.cpp

    r34587 r34597  
    118118
    119119    if (adjust > 0)
    120         munmap(reinterpret_cast<void*>(address), adjust);
     120        munmap(reinterpret_cast<char*>(address), adjust);
    121121
    122122    if (adjust < extra)
    123         munmap(reinterpret_cast<void*>(address + adjust + BLOCK_SIZE), extra - adjust);
     123        munmap(reinterpret_cast<char*>(address + adjust + BLOCK_SIZE), extra - adjust);
    124124
    125125    address += adjust;
     
    139139    free(block);
    140140#else
    141     munmap(block, BLOCK_SIZE);
     141    munmap(reinterpret_cast<char *>(block), BLOCK_SIZE);
    142142#endif
    143143}
Note: See TracChangeset for help on using the changeset viewer.