Bug 1321749 - Builds including linux/swab.h fail
Summary: Builds including linux/swab.h fail
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-29 05:07 UTC by Mairi Dulaney
Modified: 2016-03-31 12:19 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-31 12:19:06 UTC
Type: Bug


Attachments (Terms of Use)

Description Mairi Dulaney 2016-03-29 05:07:46 UTC
Description of problem:

Including linux/swab.h as follows:

#include <linux/swab.h>

void main(){

}

results in build failure:

In file included from test.c:2:0:
/usr/include/linux/swab.h:154:8: error: unknown type name ‘__always_inline’
 static __always_inline __u16 __swab16p(const __u16 *p)
        ^~~~~~~~~~~~~~~
/usr/include/linux/swab.h:154:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__swab16p’
 static __always_inline __u16 __swab16p(const __u16 *p)
                              ^~~~~~~~~
/usr/include/linux/swab.h:167:8: error: unknown type name ‘__always_inline’
 static __always_inline __u32 __swab32p(const __u32 *p)
        ^~~~~~~~~~~~~~~
/usr/include/linux/swab.h:167:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__swab32p’
 static __always_inline __u32 __swab32p(const __u32 *p)
                              ^~~~~~~~~
/usr/include/linux/swab.h:180:8: error: unknown type name ‘__always_inline’
 static __always_inline __u64 __swab64p(const __u64 *p)
        ^~~~~~~~~~~~~~~
/usr/include/linux/swab.h:180:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__swab64p’
 static __always_inline __u64 __swab64p(const __u64 *p)
                              ^~~~~~~~~
/usr/include/linux/swab.h:235:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
 static __always_inline void __swab32s(__u32 *p)
                        ^~~~
/usr/include/linux/swab.h:248:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
 static __always_inline void __swab64s(__u64 *p)
                        ^~~~


Version-Release number of selected component (if applicable):
kernel-headers-4.6.0-0.rc0.git20.1.fc25.x86_64

How reproducible:
Always


Note that this prevents qemu from building.

Comment 1 Josh Boyer 2016-03-29 12:47:24 UTC
I've reported this upstream.  It's likely because of commit bc27fb68aaad44dd8f5c34924f05721f0abaeec1.  We'll see what they suggest.

Comment 2 Mairi Dulaney 2016-03-29 14:14:13 UTC
Do you happen to have the upstream bug so I may follow along?

Comment 3 Josh Boyer 2016-03-29 14:17:07 UTC
(In reply to John Dulaney from comment #2)
> Do you happen to have the upstream bug so I may follow along?

No.  It wasn't an upstream bugzilla.  I sent an email to the upstream maintainers.  Unfortunately, I also forgot to CC any relevant mailing lists so it isn't archived anywhere.  I've yet to get a reply but I'll be sure to CC lkml if/when I do.

Comment 4 Josh Boyer 2016-03-30 19:55:27 UTC
I've included the upstream patch for this in Fedora git now.  It will be fixed in the next build.

Comment 5 Josh Boyer 2016-03-31 12:19:06 UTC
Fixed in 4.6.0-0.rc1.git0.3.fc25.  Will be in tomorrow's compose.


Note You need to log in before you can comment on or make changes to this bug.