Skip to content

Commit

Permalink
fix: electron 11 prebuilds were broken (#2237)
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed May 24, 2021
1 parent 5beaf47 commit ac25b3a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/bindings/binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'conditions': [
['OS=="win"',
{
'defines': ['CHECK_NODE_MODULE_VERSION'],
'sources': [
'src/serialport_win.cpp'
],
Expand Down
7 changes: 7 additions & 0 deletions packages/bindings/src/serialport.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#ifndef PACKAGES_SERIALPORT_SRC_SERIALPORT_H_
#define PACKAGES_SERIALPORT_SRC_SERIALPORT_H_

// Workaround for electron 11 abi issue https://github.com/serialport/node-serialport/issues/2191
#include <node_version.h>
#if CHECK_NODE_MODULE_VERSION && NODE_MODULE_VERSION == 85
#define V8_REVERSE_JSARGS
#endif

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down

0 comments on commit ac25b3a

Please sign in to comment.