Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Commit

Permalink
Adjust for new constants.
Browse files Browse the repository at this point in the history
  • Loading branch information
anseki committed Jul 27, 2019
1 parent 1298552 commit 3d14a9a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/readline-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ function _readlineSync(options) {
if (!fsB) {
fsB = process.binding('fs'); // For raw device path
constants = process.binding('constants');
// for v6.3.0+
constants = constants && constants.fs && typeof constants.fs.O_RDWR === 'number'
? constants.fs : constants;
}
return fsB;
}
Expand Down

0 comments on commit 3d14a9a

Please sign in to comment.