Fix compile errors

This commit is contained in:
rdb 2017-11-24 22:33:49 +01:00
parent d755de849c
commit 409b241b40
3 changed files with 7 additions and 5 deletions

View File

@ -1830,7 +1830,7 @@ class Freezer:
elif data[:4] in (b'\xFE\xED\xFA\xCE', b'\xCE\xFA\xED\xFE',
b'\xFE\xED\xFA\xCF', b'\xCF\xFA\xED\xFE'):
off = self._find_symbol_macho(macho_data, symbol_name)
off = self._find_symbol_macho(data, symbol_name)
if off is not None:
data[off:off+len(replacement)] = replacement
return True

View File

@ -117,8 +117,10 @@ reload_implicit_pages() {
};
#ifdef _MSC_VER
const BlobInfo *blobinfo = (const BlobInfo *)GetProcAddress(GetModuleHandle(NULL), "blobinfo");
#else
#elif defined(RTLD_SELF)
const BlobInfo *blobinfo = (const BlobInfo *)dlsym(RTLD_SELF, "blobinfo");
#else
const BlobInfo *blobinfo = (const BlobInfo *)dlsym(dlopen(NULL, RTLD_NOW), "blobinfo");
#endif
if (blobinfo != nullptr && (blobinfo->version == 0 || blobinfo->num_pointers < 10)) {
blobinfo = nullptr;

View File

@ -362,9 +362,9 @@ int main(int argc, char *argv[]) {
}
#ifdef _WIN32
if (codepage != 0) {
SetConsoleCP(codepage);
SetConsoleOutputCP(codepage);
if (blobinfo.codepage != 0) {
SetConsoleCP(blobinfo.codepage);
SetConsoleOutputCP(blobinfo.codepage);
}
#endif