I'm using JLirc to access my remote control in java. It uses a native method to connect to lirc through a socket. Unfortunately, the last update of JLirc was 15 years ago, so it has no support for 64 bit systems.
I therefore turned to JUDS, which should be able to give me another way to create a socket to connect to lirc.
I use what I think is standard C methods to compile the library accessed through java (libunixdomainsocket-linux-x86_64.so
). I created the config file usingautoconf
and the makefile using ./configure
.
If I now run make
, I get the following error:
/usr/bin/javah -sourcepath . -o com/etsy/net/UnixDomainSocket.h com.etsy.net.UnixDomainSocket
gcc -g -O2 -shared -fPIC -I /usr/include -I /usr/include/linux -I /usr/lib/jvm/java-7-openjdk-amd64/include -m32 -o libunixdomainsocket-linux-i386.so com/etsy/net/UnixDomainSocket.c
In file included from /usr/include/stdio.h:74:0,
from /usr/lib/jvm/java-7-openjdk-amd64/include/jni.h:39,
from com/etsy/net/UnixDomainSocket.h:2,
from com/etsy/net/UnixDomainSocket.c:6:
/usr/include/libio.h:306:3: error: unknown type name ‘size_t’
size_t __pad5;
I read on this question that including <stddef.h>
would help. However, adding the line #include <stddef.h>
in the .c source file that it tries to compile doesn't help.
Any idea what I can do to fix this?
- Find a way to compile JUDS and get my .so file
- Find another way than JUDS to connect to a linux socket in java
- find another way than JLirc to connect to lirc through java