First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 132332
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Tim Yamin (RETIRED) <plasmaroo@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Dick Marinus <dick@mrns.nl>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
kernel-2.eclass.patch kernel-2.eclass.patch patch Dick Marinus 2006-05-05 09:25 0000 605 bytes Details | Diff
kernel-2.eclass.patch kernel-2.eclass.patch patch Dick Marinus 2006-05-06 02:37 0000 627 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 132332 depends on: Show dependency tree
Show dependency graph
Bug 132332 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-05-05 04:55 0000
$ echo "#include <linux/ethtool.h>" > test.c

$ gcc -c test.c
In file included from test.c:1:
/usr/include/linux/ethtool.h:330: error: syntax error before "u32"
/usr/include/linux/ethtool.h:343: error: syntax error before "u32"
/usr/include/linux/ethtool.h:345: error: syntax error before "u32"
/usr/include/linux/ethtool.h:347: error: syntax error before "u32"
/usr/include/linux/ethtool.h:349: error: syntax error before "u32"
/usr/include/linux/ethtool.h:353: error: syntax error before "u32"

I've rsync-ed and re-emerged sys-kernel/linux-headers-2.6.11-r5 today.
Replacing the broken u32 to __u32 seems to fix these issues. I'm running ~x86.

------- Comment #1 From Dick Marinus 2006-05-05 08:25:17 0000 -------
maybe:
sed 's/\(__\)\?\([us]\(8\|16\|32\|64\)\)/__\2/g' 

would fix the problem?

------- Comment #2 From Dick Marinus 2006-05-05 09:25:32 0000 -------
Created an attachment (id=86205) [edit]
kernel-2.eclass.patch

diff -ud orig/linux/ethtool.h linux/ethtool.h
--- orig/linux/ethtool.h        2006-05-05 17:04:26.000000000 +0200
+++ linux/ethtool.h     2006-05-05 17:31:20.000000000 +0200
@@ -42,7 +42,7 @@
                                /* For PCI devices, use pci_name(pci_dev). */
        char    reserved1[32];
        char    reserved2[16];
-       __u32   n_stats;        /* number of u64's from ETHTOOL_GSTATS */
+       __u32   n_stats;        /* number of __u64's from ETHTOOL_GSTATS */
        __u32   testinfo_len;
        __u32   eedump_len;     /* Size of data from ETHTOOL_GEEPROM (bytes) */
        __u32   regdump_len;    /* Size of data from ETHTOOL_GREGS (bytes) */
@@ -248,7 +248,7 @@
 /* for dumping NIC-specific statistics */
 struct ethtool_stats {
        __u32   cmd;            /* ETHTOOL_GSTATS */
-       __u32   n_stats;        /* number of u64's being returned */
+       __u32   n_stats;        /* number of __u64's being returned */
        __u64   data[0];
 };

@@ -327,7 +327,7 @@
        void    (*get_wol)(struct net_device *, struct ethtool_wolinfo *);
        int     (*set_wol)(struct net_device *, struct ethtool_wolinfo *);
        __u32   (*get_msglevel)(struct net_device *);
-       void    (*set_msglevel)(struct net_device *, u32);
+       void    (*set_msglevel)(struct net_device *, __u32);
        int     (*nway_reset)(struct net_device *);
        __u32   (*get_link)(struct net_device *);
        int     (*get_eeprom_len)(struct net_device *);
@@ -340,17 +340,17 @@
        void    (*get_pauseparam)(struct net_device *, struct
ethtool_pauseparam*);
        int     (*set_pauseparam)(struct net_device *, struct
ethtool_pauseparam*);
        __u32   (*get_rx_csum)(struct net_device *);
-       int     (*set_rx_csum)(struct net_device *, u32);
+       int     (*set_rx_csum)(struct net_device *, __u32);
        __u32   (*get_tx_csum)(struct net_device *);
-       int     (*set_tx_csum)(struct net_device *, u32);
+       int     (*set_tx_csum)(struct net_device *, __u32);
        __u32   (*get_sg)(struct net_device *);
-       int     (*set_sg)(struct net_device *, u32);
+       int     (*set_sg)(struct net_device *, __u32);
        __u32   (*get_tso)(struct net_device *);
-       int     (*set_tso)(struct net_device *, u32);
+       int     (*set_tso)(struct net_device *, __u32);
        int     (*self_test_count)(struct net_device *);
        void    (*self_test)(struct net_device *, struct ethtool_test *, __u64
*);
        void    (*get_strings)(struct net_device *, __u32 stringset, __u8 *);
-       int     (*phys_id)(struct net_device *, u32);
+       int     (*phys_id)(struct net_device *, __u32);
        int     (*get_stats_count)(struct net_device *);
        void    (*get_ethtool_stats)(struct net_device *, struct ethtool_stats
*, __u64 *);
        int     (*begin)(struct net_device *);

------- Comment #3 From Dick Marinus 2006-05-06 02:37:19 0000 -------
Created an attachment (id=86243) [edit]
kernel-2.eclass.patch

symbols like __fs16 are safe now.

Please note sys-kernel/linux-headers-2.6.16 needs to be instructed to ignore
asm/types.h.

------- Comment #4 From Tim Yamin (RETIRED) 2006-05-06 06:43:06 0000 -------
's:\<\([us]\(8\|16\|32\|64\)\)\>:__\1:g'

^^ Want to just try that instead? I'm not sure where the fsXX types are used
(and if types.h defines those I doubt they'd conflict in userspace anyway).

------- Comment #5 From Dick Marinus 2006-05-06 08:29:00 0000 -------
word match, smart! ethtool.h seems to be fixed correctly.

you are right about asm/types.h which doesn't break userspace but the
kernel-2.eclass seems to run 'make oldconfig' which defines __KERNEL__.

There are more headers broken, I'm also having the same problems with mii.h and
ext3_fs.h.

fsXX isn't a problem with your regexp either, you can find them by using: egrep
'[A-Za-z0-9][us](8|16|32|64)' /usr/include/linux -r

------- Comment #6 From Tim Yamin (RETIRED) 2006-05-06 08:30:41 0000 -------
(In reply to comment #5)
> There are more headers broken, I'm also having the same problems with mii.h and
> ext3_fs.h.

Hmm, did you rerun the updated sed on those headers as well? If they still
break post compiler errors please.

------- Comment #7 From Dick Marinus 2006-05-06 10:28:54 0000 -------
I'm commenting about linux-headers-2.6.11-r5 which seems to patch jiffies.h and
ethtool.h, could you please add mii.h and ext3_fs.h to this list?

------- Comment #8 From Tim Yamin (RETIRED) 2006-07-28 14:32:47 0000 -------
Now fixed in CVS; sorry about the delay! Thanks...

First Last Prev Next    No search results available      Search page      Enter new bug