Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Sergei Trofimovich <slyich@gmail.com>
To: David Sterba <dsterba@suse.cz>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] ioctl.h: add missing kernel compatibility header for BUILD_ASSERT
Date: Sat, 12 Nov 2016 22:14:49 +0000	[thread overview]
Message-ID: <20161112221449.0cd3d16b@sf> (raw)
In-Reply-To: <20161024125205.GB11398@twin.jikos.cz>

[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]

On Mon, 24 Oct 2016 14:52:05 +0200
David Sterba <dsterba@suse.cz> wrote:

> Hi,
> 
> On Mon, Oct 24, 2016 at 09:29:12AM +0100, slyich@gmail.com wrote:
> > From: Sergei Trofimovich <slyfox@gentoo.org>
> > 
> > Header breakage noticed by cynede. Reproducible as:
> > 
> >     $ gcc -c /usr/include/btrfs/ioctl.h -o /tmp/a.o
> >         /usr/include/btrfs/ioctl.h:42:14: error: expected declaration specifiers or '...' before 'sizeof'
> >      BUILD_ASSERT(sizeof(struct btrfs_ioctl_vol_args) == 4096);
> >                   ^~~~~~
> > 
> > Basically gcc tries to say us BUILD_ASSERT is not visible.
> > 
> > BUILD_ASSERT lives in kerncompat.h which this change adds.  
> 
> I think including the kerncompat.h is too intrusive here, I've fixed by
> providing an empty macro if it's not defined. I'll release 4.8.2 soon.

Apologies. I did not test your fix right afterwards. Seems now header is incomplete
due to missing NULL (gcc-6):

btrfs-progs-v4.8.3 $ gcc -c ioctl.h -o /tmp/a.o
ioctl.h: In function 'btrfs_err_str':
ioctl.h:711:11: error: 'NULL' undeclared (first use in this function)
    return NULL;
           ^~~~
ioctl.h:711:11: note: each undeclared identifier is reported only once for each function it appears in

-- 

  Sergei

[-- Attachment #2: ЦиÑÑÐ¾Ð²Ð°Ñ Ð¿Ð¾Ð´Ð¿Ð¸ÑÑ OpenPGP --]
[-- Type: application/pgp-signature, Size: 163 bytes --]

  reply	other threads:[~2016-11-12 22:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-24  8:29 [PATCH] ioctl.h: add missing kernel compatibility header for BUILD_ASSERT slyich
2016-10-24 12:52 ` David Sterba
2016-11-12 22:14   ` Sergei Trofimovich [this message]
2016-11-14 12:34     ` David Sterba
2016-11-14 15:50       ` David Sterba

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=20161112221449.0cd3d16b@sf \
    --to=slyich@gmail.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@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