From: Norbert Lange Date: Wed, 25 Apr 2018 15:05:42 +0200 Message-Id: <20180425130542.4353-2-norbert.lange@andritz.com> In-Reply-To: <20180425130542.4353-1-norbert.lange@andritz.com> References: <20180425130542.4353-1-norbert.lange@andritz.com> Subject: [Xenomai] [PATCH] add missing headers and casts, prefer POSIX definitions List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xenomai@xenomai.org silences some compiler warnings Signed-off-by: Norbert Lange --- demo/posix/cobalt/gpiopwm.c | 4 ++-- testsuite/smokey/posix-select/posix-select.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/demo/posix/cobalt/gpiopwm.c b/demo/posix/cobalt/gpiopwm.c index b34cbf1e1..eddd5cce5 100644 --- a/demo/posix/cobalt/gpiopwm.c +++ b/demo/posix/cobalt/gpiopwm.c @@ -219,7 +219,7 @@ static void *gpiopwm_udp_ctrl_thread(void *cookie) saddr.sin_port = htons(port); saddr.sin_family = AF_INET; - if (bind(sockfd, &saddr, sizeof(saddr)) < 0) + if (bind(sockfd, (struct sockaddr *)&saddr, sizeof(saddr)) < 0) perror("bind"); clen = sizeof(caddr); @@ -230,7 +230,7 @@ static void *gpiopwm_udp_ctrl_thread(void *cookie) print_config("UDP Server\n"); memset(buf,'\0', blen); - ret = recvfrom(sockfd, buf, blen - 1, 0, &caddr, &clen); + ret = recvfrom(sockfd, buf, blen - 1, 0, (struct sockaddr *)&caddr, &clen); if (ret < 0) perror("recvfrom"); diff --git a/testsuite/smokey/posix-select/posix-select.c b/testsuite/smokey/posix-select/posix-select.c index 6bd88ddb5..e9bf938b3 100644 --- a/testsuite/smokey/posix-select/posix-select.c +++ b/testsuite/smokey/posix-select/posix-select.c @@ -30,6 +30,9 @@ #include #include #include +#include +#include +#include #include smokey_test_plugin(posix_select, -- 2.17.0