From patchwork Wed Sep 23 09:46:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1369758 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BxCxT6vXCz9sSt for ; Wed, 23 Sep 2020 19:46:37 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 67FF43C4D57 for ; Wed, 23 Sep 2020 11:46:35 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [IPv6:2001:4b78:1:20::7]) by picard.linux.it (Postfix) with ESMTP id BD3BE3C101E for ; Wed, 23 Sep 2020 11:46:32 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-7.smtp.seeweb.it (Postfix) with ESMTPS id B400B200C11 for ; Wed, 23 Sep 2020 11:46:31 +0200 (CEST) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 527C0ACB8; Wed, 23 Sep 2020 09:47:08 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 23 Sep 2020 11:46:25 +0200 Message-Id: <20200923094625.30601-1-pvorel@suse.cz> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-7.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.0 required=7.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-7.smtp.seeweb.it Subject: [LTP] [PATCH 1/1] recvmmsg01: Fix compilation X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Filip.Bozuta@syrmia.com Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" void* cannot be directly used, it must be pointing to the struct. recvmmsg01.c:86:9: error: request for member ‘type’ in something not a structure or union timeout.type = tv->ts_type; Fixes: 135af8ede ("syscalls/{send|recv}mmsg: add a test case for timeout and errno test") Reported-by: Li Wang Signed-off-by: Petr Vorel --- testcases/kernel/syscalls/recvmmsg/recvmmsg01.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/syscalls/recvmmsg/recvmmsg01.c b/testcases/kernel/syscalls/recvmmsg/recvmmsg01.c index fe637430b..a16a78f9b 100644 --- a/testcases/kernel/syscalls/recvmmsg/recvmmsg01.c +++ b/testcases/kernel/syscalls/recvmmsg/recvmmsg01.c @@ -65,7 +65,8 @@ static void do_test(unsigned int i) { struct time64_variants *tv = &variants[tst_variant]; struct test_case *tc = &tcase[i]; - void *rcv_msgvec, *timeout; + struct tst_ts t; + void *rcv_msgvec, *timeout = &t; tst_res(TINFO, "case %s", tc->desc); @@ -83,7 +84,7 @@ static void do_test(unsigned int i) memset(rcv1->iov_base, 0, rcv1->iov_len); memset(rcv2->iov_base, 0, rcv2->iov_len); - timeout.type = tv->ts_type; + ((struct tst_ts*)timeout)->type = tv->ts_type; tst_ts_set_sec(&ts, tc->tv_sec); tst_ts_set_nsec(&ts, tc->tv_nsec);