Fixed warnings

This commit is contained in:
M66B 2017-12-20 17:58:32 +01:00
parent 6ee4c8939f
commit 0309cb187f
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
#include <jni.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <unistd.h>

View File

@ -181,7 +181,7 @@ int get_receive_buffer(const struct ng_session *cur) {
// /proc/sys/net/core/wmem_default
int sendbuf = 0;
int sendbufsize = sizeof(sendbuf);
if (getsockopt(cur->socket, SOL_SOCKET, SO_SNDBUF, &sendbuf, &sendbufsize) < 0)
if (getsockopt(cur->socket, SOL_SOCKET, SO_SNDBUF, &sendbuf, (socklen_t *) &sendbufsize) < 0)
log_android(ANDROID_LOG_WARN, "getsockopt SO_RCVBUF %d: %s", errno, strerror(errno));
if (sendbuf == 0)