electron / libchromiumcontent

Shared library build of Chromium’s Content module
MIT License
486 stars 183 forks source link

fix: [m67] patch leveldb to not redefine ssize_t #682

Closed nornagon closed 6 years ago

nornagon commented 6 years ago
Description of Change

node.js (and its dependencies) define the ssize_t type in their headers on Windows, using a guard to prevent redefinition. leveldb also defines the ssize_t type in the port_chromium.h file, but without the redefinition guard. This causes a compilation error on windows, because the type is defined twice when compiling atom_api_browser_window.cc in electron.

Checklist
alexeykuzmin commented 6 years ago

Is there a chance to upstream it?

nornagon commented 6 years ago

Yes, I think this is potentially upstreamable.

deepak1556 commented 6 years ago

Just saw this, reminded of the hack we did during ch63 upgrade i guess for the exact issue https://github.com/electron/electron/blob/master/atom/browser/api/atom_api_web_contents.cc#L10-L14, I think that hack can be removed safely in 67 now with this patch in place. @nornagon can you remove it in the 67 branch ? Thanks!