Comment 4 for bug 239765

Revision history for this message
Sveinung Kvilhaugsvik (kvilhaugsvik) wrote :

Adding -D_GNU_SOURCE (to get acess to ucred that is cr's type) to the cflags fixes this, but brings on a new problem.

echo "Class-Path: /usr/share/java/hexdump.jar" > Manifest
(cd classes;jar cfm ../debug-disable-1.1.jar ../Manifest cx/ath/matthew/debug/*.class)
(cd classes; /usr/bin/fastjar cf ../io-0.1.jar cx/ath/matthew/io/*class)
(cd classes; /usr/bin/fastjar cf ../hexdump-0.2.jar cx/ath/matthew/utils/Hexdump.class)
/usr/lib/jvm/default-java/bin/javah -classpath classes -o cgi-java.h cx.ath.matthew.cgi.CGI
cc -D_GNU_SOURCE -fpic -Wall -Os -pedantic -std=c99 -Werror -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux -c -o cgi-java.o cgi-java.c
ld -Bsymbolic-functions -fpic -shared -lc -o libcgi-java.so cgi-java.o
/usr/lib/jvm/default-java/bin/javah -classpath classes -o unix-java.h cx.ath.matthew.unix.UnixServerSocket cx.ath.matthew.unix.UnixSocket cx.ath.matthew.unix.USInputStream cx.ath.matthew.unix.USOutputStream
cc -D_GNU_SOURCE -fpic -Wall -Os -pedantic -std=c99 -Werror -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux -c -o unix-java.o unix-java.c
unix-java.c: In function 'Java_cx_ath_matthew_unix_UnixSocket_native_1send_1creds':
unix-java.c:384: error: request for member 'pid' in something not a structure or union
unix-java.c:385: error: request for member 'uid' in something not a structure or union
unix-java.c:386: error: request for member 'gid' in something not a structure or union
unix-java.c: In function 'Java_cx_ath_matthew_unix_UnixSocket_native_1recv_1creds':
unix-java.c:415: error: conflicting types for 'buf'
unix-java.c:402: error: previous definition of 'buf' was here
unix-java.c:425: error: 'msgh' undeclared (first use in this function)
unix-java.c:425: error: (Each undeclared identifier is reported only once
unix-java.c:425: error: for each function it appears in.)
cc1: warnings being treated as errors
unix-java.c:435: error: passing argument 5 of '(*env)->SetIntArrayRegion' from incompatible pointer type
unix-java.c:439: error: return makes integer from pointer without a cast
unix-java.c:439: error: function returns address of local variable
make[1]: *** [unix-java.o] Error 1