Skip to content

Commit

Permalink
Fix port listing (scream3r#50)
Browse files Browse the repository at this point in the history
Adds back platform detection; accidentally removed with 00e81c0
  • Loading branch information
tresf committed Apr 25, 2019
1 parent ecb9027 commit e3f3689
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/java/jssc/SerialNativeInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ public class SerialNativeInterface {
public static final String PROPERTY_JSSC_PARMRK = "JSSC_PARMRK";

static {
String osName = System.getProperty("os.name");
if(osName.equals("Linux"))
osType = OS_LINUX;
else if(osName.startsWith("Win"))
osType = OS_WINDOWS;
else if(osName.equals("SunOS"))
osType = OS_SOLARIS;
else if(osName.equals("Mac OS X") || osName.equals("Darwin"))
osType = OS_MAC_OS_X;
try {
NativeLoader.loadLibrary("jssc");
} catch (IOException ioException) {
Expand Down

0 comments on commit e3f3689

Please sign in to comment.