Return-Path: Date: Wed, 22 Jan 2014 17:07:30 +0100 From: Natanael Copa To: Anderson Lizardo Cc: BlueZ development , Natanael Copa Subject: Re: [PATCH v2 1/3] various header include fixes for building with musl libc Message-ID: <20140122170730.35ecc008@ncopa-desktop.alpinelinux.org> In-Reply-To: References: <1390398620-1916-1-git-send-email-ncopa@alpinelinux.org> <1390398620-1916-2-git-send-email-ncopa@alpinelinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-bluetooth-owner@vger.kernel.org List-ID: On Wed, 22 Jan 2014 11:16:20 -0400 Anderson Lizardo wrote: > Hi Natanael, > > On Wed, Jan 22, 2014 at 9:50 AM, Natanael Copa wrote: > > diff --git a/src/textfile.h b/src/textfile.h > > index b779bd2..e26da5d 100644 > > --- a/src/textfile.h > > +++ b/src/textfile.h > > @@ -24,6 +24,8 @@ > > #ifndef __TEXTFILE_H > > #define __TEXTFILE_H > > > > +#include > > + > > I believe the correct approach here is to include sys/stat.h on all > files that include textfile.h. We (usually) don't #include system > headers inside internal headers. The header itself uses mode_t: ./src/textfile.h:27:1: error: unknown type name 'mode_t' So all the files that include textfiles.h needs to include sys/stat.h *before* the include textfile.h in that case. I'd say that all filesm that uses mode_t including textfile.h should include sys/stat.h. I can make a new patch for either. Just let me know what you want. -nc