linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/2] workqueue: add missing pthreads header
Date: Fri, 16 Mar 2018 08:08:46 +0200	[thread overview]
Message-ID: <20180316060846.imxc42urbsb222sn@tarshish> (raw)
In-Reply-To: <20180316053016.GB1757@magnolia>

Hi Darrick,

On Thu, Mar 15, 2018 at 10:30:16PM -0700, Darrick J. Wong wrote:
> On Fri, Mar 16, 2018 at 07:21:35AM +0200, Baruch Siach wrote:
> > Fix the following build failure with musl libc:
> > 
> > In file included from read_verify.c:25:0:
> > ../include/workqueue.h:39:2: error: unknown type name 'pthread_t'
> >   pthread_t  *threads;
> >   ^~~~~~~~~
> > ../include/workqueue.h:42:2: error: unknown type name 'pthread_mutex_t'
> >   pthread_mutex_t  lock;
> >   ^~~~~~~~~~~~~~~
> > ../include/workqueue.h:43:2: error: unknown type name 'pthread_cond_t'
> >   pthread_cond_t  wakeup;
> >   ^~~~~~~~~~~~~~
> > 
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > ---
> >  include/workqueue.h | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/include/workqueue.h b/include/workqueue.h
> > index b4b3541701df..edb2f8ac5991 100644
> > --- a/include/workqueue.h
> > +++ b/include/workqueue.h
> > @@ -22,6 +22,8 @@
> >  #ifndef	_WORKQUEUE_H_
> >  #define	_WORKQUEUE_H_
> >  
> > +#include <pthread.h>
> 
> Ooops, sorry about that.
> 
> Our convention within xfsprogs sources (I think) is for most header
> files to avoid having headers include other headers.  Would you mind
> adding this include to read_verify.c instead?

I don't mind. But requiring every user of workqueue.h to remember to have 
pthread.h before, is error prone IMO.

> (That said, you probably ought to wait for the maintainer (Eric) to
> weigh in on this before you do any more work.)

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

  reply	other threads:[~2018-03-16  6:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-16  5:21 [PATCH 1/2] workqueue: add missing pthreads header Baruch Siach
2018-03-16  5:21 ` [PATCH 2/2] xfs_scrub: add missing paths header Baruch Siach
2018-03-16  5:25   ` Darrick J. Wong
2018-03-16  5:30 ` [PATCH 1/2] workqueue: add missing pthreads header Darrick J. Wong
2018-03-16  6:08   ` Baruch Siach [this message]
2018-03-22 22:05     ` Eric Sandeen
2018-03-22 22:58       ` Eric Sandeen
2018-03-22 23:04         ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180316060846.imxc42urbsb222sn@tarshish \
    --to=baruch@tkos.co.il \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).