jextract can fail if a C header file have a typedef that collides with the java.lang classes on a primitive type.
For example, with following C header,
typedef char Byte;
void func(Byte byte, Byte* out);
jextract would spit out a function like following,
public void func(byte byte$, Pointer<Byte> out);
and an annotation class for typedef,
public static @interface Byte {}
This will cause compilation errors on the static-forwarder or user code.
The immediate thought would be trying to use --exclude-symbol to filter out Byte, but that doesn't work because symbol filter doesn't apply to typedef.
For example, with following C header,
typedef char Byte;
void func(Byte byte, Byte* out);
jextract would spit out a function like following,
public void func(byte byte$, Pointer<Byte> out);
and an annotation class for typedef,
public static @interface Byte {}
This will cause compilation errors on the static-forwarder or user code.
The immediate thought would be trying to use --exclude-symbol to filter out Byte, but that doesn't work because symbol filter doesn't apply to typedef.