From patchwork Wed Sep 9 07:18:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 1360359 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=Vmmn11SM; dkim-atps=neutral Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BmYJy5xbHz9sSJ for ; Wed, 9 Sep 2020 17:18:26 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 4E26F102D1; Wed, 9 Sep 2020 09:18:14 +0200 (CEST) X-Original-To: devel@uclibc-ng.org Delivered-To: devel@helium.openadk.org Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by helium.openadk.org (Postfix) with ESMTPS id 6769B102A9; Wed, 9 Sep 2020 09:18:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1599635891; x=1631171891; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=2zABN4BKvMBRZSYIscsUoOAkI+UcfFR5cLc0SX/8UTs=; b=Vmmn11SMYT2gDXh+MtbZplOxCis9UR4X9cJc1zepfVc8e5eB8Rzz/3js 0o9SKf9Wjrbkg9pFNlDaArYGz8ieX4Q1aRkhJDw3/EmfjyynyhvibpyJJ jjgChmulKHQ7v1PfRX2zeB8FrNOV/VEBDY+66P5+VrnoDjLw9NnqPFrjH 2SGtGXiStcgjPx5+QI3UrsrfAqHXecNg+UO53V/Ob4eJNfx3kTaBW6m0A sCo7vfvLeq4viFkuRELwgMML6R8nHtGDkPSR1vhSGshtYmHfiQI7hB009 sozDUGqpQgTaJ1PU4MK2BsalSHkF0wr2sSwuQvJUBeQZnaC6LCj1+OHPH g==; IronPort-SDR: lywAGhm8CTVfuy1Orn6YBtJOo19lce3xj1rGhJCMfNWiTKDpwPk1kKQxiUrbPQjwM9oQCWvwuI hiU8vG0PEeZr31rqqvYAOtQOuKOTnzlR7gdzkP/soI2iaX0O333s8OzFqfMeGZwxOkF/SoJWZI CaX7pEGEPLaO9kggRMCjzAzlazteCoUDiVq72yFAAdMdCfn8ej4DG16TiEGEZSc/WiBZUvx2Oz JZMdm5V0C4dgbxUIWQm6HOLJA5AMamxlWJZIG5U1i6JueRhE5cE15dgJUtC7LtKeR0YAnjQseM qhE= X-IronPort-AV: E=Sophos;i="5.76,408,1592841600"; d="scan'208";a="148131953" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 09 Sep 2020 15:18:08 +0800 IronPort-SDR: UTSnjTUrA4e76eiQ7loAksMk+wB5kexhpBQKsCm5DiBv4daQLG5+r0FPwVl036LtehqCrxhZU3 TMX923yk+5Ng== Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2020 00:04:33 -0700 IronPort-SDR: ePJ6LCZvQauO0Ah4q3albYjysPEkiIIaDlo55onmZRETBcFlEGRWvX749ent4waMR0gF/JCwcx Ej/gBA30SG1w== WDCIronportException: Internal Received: from 6hj08h2.ad.shared (HELO localhost.hgst.com) ([10.84.70.99]) by uls-op-cesaip01.wdc.com with ESMTP; 09 Sep 2020 00:18:07 -0700 From: Damien Le Moal To: devel@uclibc-ng.org, Waldemar Brodkorb Date: Wed, 9 Sep 2020 16:18:04 +0900 Message-Id: <20200909071804.35932-3-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200909071804.35932-1-damien.lemoal@wdc.com> References: <20200909071804.35932-1-damien.lemoal@wdc.com> MIME-Version: 1.0 Subject: [uclibc-ng-devel] [PATCH 2/2] librt: avoid compilation error X-BeenThere: devel@uclibc-ng.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: uClibc-ng Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devel-bounces@uclibc-ng.org Sender: "devel" For NOMMU builds, LIBC_CANCEL_ASYNC and LIBC_CANCEL_RESET are not defined. Prevent these macros from being visible by the compiler in clock_nanosleep() by replacing "if (SINGLE_THREAD_P) {" with the pre-compiler directive "#if defined(SINGLE_THREAD_P)". Signed-off-by: Damien Le Moal --- librt/clock_nanosleep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/librt/clock_nanosleep.c b/librt/clock_nanosleep.c index 4cf1e06b4..1515cf5b0 100644 --- a/librt/clock_nanosleep.c +++ b/librt/clock_nanosleep.c @@ -36,9 +36,9 @@ clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req, if (clock_id == CLOCK_PROCESS_CPUTIME_ID) clock_id = MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED); - if (SINGLE_THREAD_P) +#if defined(SINGLE_THREAD_P) r = INTERNAL_SYSCALL (clock_nanosleep, err, 4, clock_id, flags, req, rem); - else +#else { int oldstate = LIBC_CANCEL_ASYNC (); @@ -47,6 +47,7 @@ clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req, LIBC_CANCEL_RESET (oldstate); } +#endif return (INTERNAL_SYSCALL_ERROR_P (r, err) ? INTERNAL_SYSCALL_ERRNO (r, err) : 0);