Skip to content

Commit

Permalink
Fix JNA CLibrary constants on non x86 platforms, fixes #687 (#727)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet authored Oct 18, 2021
1 parent 057d00e commit 3654a2a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.util.List;

import com.sun.jna.LastErrorException;
import com.sun.jna.Platform;
import com.sun.jna.Structure;
import org.jline.terminal.Attributes;
import org.jline.terminal.Attributes.ControlChar;
Expand Down Expand Up @@ -263,8 +264,8 @@ private <T extends Enum<T>> void addFlag(int value, EnumSet<T> flags, T flag, in

// CONSTANTS

int TIOCGWINSZ = 0x00005413;
int TIOCSWINSZ = 0x00005414;
int TIOCGWINSZ = Platform.isMIPS() || Platform.isPPC() || Platform.isSPARC() ? 0x40087468 : 0x00005413;
int TIOCSWINSZ = Platform.isMIPS() || Platform.isPPC() || Platform.isSPARC() ? 0x80087467 : 0x00005414;

int VINTR = 0;
int VQUIT = 1;
Expand Down

0 comments on commit 3654a2a

Please sign in to comment.