Closed savageautomate closed 3 years ago
We are still trying to validate this fix. Reopening until validation is complete.
In answer https://github.com/Pi4J/pi4j-v1/issues/521#issue-805878805
In pi4j-core --> com_pi4j_io_file_LinuxFile.h
In pi4j-core --> com_pi4j_io_file_LinuxFile.c
That must be both pi4j-native
, right?
One more thing that is missing in the explanation text is to import the following in LinuxFile.java
:
import java.io.FileDescriptor
FileDescriptor
is used as parameter in the getPosixFD()
JNI prototype call).
Reported by: Steven F. LeBrun
In pi4j-core -->
LinuxFile.java
Remove the "import jdk.internal.misc.SharedSecrets;
" line.Change the
getFileDescriptor()
method to:Add the following line to the end of the
LinuxFile
class:In pi4j-core -->
com_pi4j_io_file_LinuxFile.h
Add the following lines to the end of the file before the closing bracket:In pi4j-core -->
com_pi4j_io_file_LinuxFile.c
Add the following code to the end of the .c file:Related Issues:
404
442