diff options
author | ed <ed@FreeBSD.org> | 2009-03-03 18:47:33 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-03-03 18:47:33 +0000 |
commit | 7cfe6a40d7e0a1e79b1ceb60cfbe18d0b9f2fc32 (patch) | |
tree | 3edcd3e9595b3c05dc65d88431472e5852901461 /sys/netgraph/ng_pppoe.h | |
parent | a44f90cda61e735ac2de68fd726ac81ee2c45757 (diff) | |
download | FreeBSD-src-7cfe6a40d7e0a1e79b1ceb60cfbe18d0b9f2fc32.zip FreeBSD-src-7cfe6a40d7e0a1e79b1ceb60cfbe18d0b9f2fc32.tar.gz |
Make Netgraph compile with Clang.
Clang disallows structs with variable length arrays to be nested inside
other structs, because this is in violation with ISO C99. Even though we
can keep bugging the LLVM folks about this issue, we'd better just fix
our code to not do this. This code seems to be the only code in the
entire source tree that does this.
I haven't tested this patch by using the kernel modules in question, but
Diane Bruce and I have compared disassembled versions of these kernel
modules. We would have expected them to be exactly the same, but due to
randomness in the register allocator and reordering of instructions,
there were some minor differences.
Approved by: julian
Diffstat (limited to 'sys/netgraph/ng_pppoe.h')
-rw-r--r-- | sys/netgraph/ng_pppoe.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/netgraph/ng_pppoe.h b/sys/netgraph/ng_pppoe.h index 3360081..d5126cf 100644 --- a/sys/netgraph/ng_pppoe.h +++ b/sys/netgraph/ng_pppoe.h @@ -201,7 +201,6 @@ struct ngpppoe_sts { struct pppoe_tag { u_int16_t tag_type; u_int16_t tag_len; - char tag_data[]; }__packed; struct pppoe_hdr{ @@ -210,7 +209,6 @@ struct pppoe_hdr{ u_int8_t code; u_int16_t sid; u_int16_t length; - struct pppoe_tag tag[]; }__packed; |