From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45855 invoked by alias); 12 Aug 2019 23:47:18 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 45819 invoked by uid 89); 12 Aug 2019 23:47:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*F:D*it X-HELO: mail-ot1-f65.google.com Received: from mail-ot1-f65.google.com (HELO mail-ot1-f65.google.com) (209.85.210.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Aug 2019 23:47:14 +0000 Received: by mail-ot1-f65.google.com with SMTP id k18so33613956otr.3 for ; Mon, 12 Aug 2019 16:47:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tesio-it.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=SoJnsSTtT6CfOc88SQDwSo95AHlqsl2hq1AcJqMIEv8=; b=rnvZOM6+MuE7wNpXCAydntGR+Y6m/UoIJzXPPcyUzKlqDHTVW8H6RPVsf1NquVXw/k 39H9RynQ5D1npo1dnDB4v/eEl03IGXig4fJqRZ3WX0L0Nf2yUAtdZG2eeRk82L8AtB+c G70X28cDm9FK64NjY6E7q22tMEBirqQDmfNEURBXAc4I0paW3gbtyftq+VYaXdnQjvi0 FpfluLAYg3R9ctiEYBkT1stTN+nm1Yf7vPe01VlUdWrHriTNmqkNgzlGX4E52FvS81dG fSrD7pYswOA52Zf6Hrqzs2oWgn0vYsvpF7aE5iOLApP2OtpIVmOVfob8HTOR5yDitTyz BLBA== MIME-Version: 1.0 Received: by 2002:a4f:705:0:0:0:0:0 with HTTP; Mon, 12 Aug 2019 16:47:12 -0700 (PDT) In-Reply-To: <20190812101611.GG11632@calimero.vinschen.de> References: <20190812075243.GC11632@calimero.vinschen.de> <20190812101611.GG11632@calimero.vinschen.de> From: Giacomo Tesio Date: Mon, 12 Aug 2019 23:47:00 -0000 Message-ID: Subject: Re: unknown type name 'cpu_set_t' in newlib/libc/include/sched.h To: newlib@sourceware.org, Giacomo Tesio , Sebastian Huber Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019/txt/msg00468.txt.bz2 Hi Corinna I can confirm this patch works fine. Thanks! Giacomo On 12/08/2019, Corinna Vinschen wrote: > From d192727fee2f85fcc7eb78c7cb09963a7b663d5a Mon Sep 17 00:00:00 2001 > From: Corinna Vinschen > Date: Mon, 12 Aug 2019 12:13:20 +0200 > Subject: [PATCH] sched.h: Declare affinity functions only on targets > supporting them > > --- > newlib/libc/include/sched.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/newlib/libc/include/sched.h b/newlib/libc/include/sched.h > index 79b775e220c7..31599aa7e6ca 100644 > --- a/newlib/libc/include/sched.h > +++ b/newlib/libc/include/sched.h > @@ -93,10 +93,16 @@ int sched_yield( void ); > #if __GNU_VISIBLE > int sched_getcpu(void); > > +/* The following functions should only be declared if the type > + cpu_set_t is defined through indirect inclusion of sys/cpuset.h, > + only available on some targets. */ > +#ifdef _SYS_CPUSET_H_ > int sched_getaffinity (pid_t, size_t, cpu_set_t *); > int sched_get_thread_affinity (void *, size_t, cpu_set_t *); > int sched_setaffinity (pid_t, size_t, const cpu_set_t *); > int sched_set_thread_affinity (void *, size_t, const cpu_set_t *); > +#endif /* _SYS_CPUSET_H_ */ > + > #endif > > #ifdef __cplusplus > -- > 2.20.1 > > > Please test or suggest an alternative.