< prev index next >
src/java.base/unix/native/libnet/NetworkInterface.c
Print this page
rev 55756 : 8228482: fix xlc16/xlclang comparison of distinct pointer types and string literal conversion warnings
@@ -1391,10 +1391,14 @@
#endif /* __linux__ */
/** AIX **/
#if defined(_AIX)
+/* seems getkerninfo is guarded by _KERNEL in the system headers */
+/* see net/proto_uipc.h */
+int getkerninfo(int, char *, int *, int32long64_t);
+
/*
* Opens a socket for further ioctl calls. Tries AF_INET socket first and
* if it fails return AF_INET6 socket.
*/
static int openSocketWithFallback(JNIEnv *env, const char *ifname) {
@@ -1610,11 +1614,11 @@
JNU_ThrowOutOfMemoryError(env,
"Network interface getMacAddress native buffer allocation failed");
return -1;
}
- if (getkerninfo(KINFO_NDD, nddp, &size, 0) < 0) {
+ if (getkerninfo(KINFO_NDD, (char*) nddp, &size, 0) < 0) {
perror("getkerninfo 2");
free(nddp);
return -1;
}
< prev index next >