Pablo, 2015-11-23 9:07 GMT-02:00 Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>: > On Mon, Nov 23, 2015 at 02:59:49AM -0200, Rodrigo Rebello wrote: >> The GNU version of 'struct tcphdr' is not exposed by musl libc headers >> unless _GNU_SOURCE is defined. Without this definition, the build fails >> with: >> >> rpc.c: In function 'rpc_helper_cb': >> rpc.c:351:15: error: 'struct tcphdr' has no member named 'doff' >> offset += th->doff * 4; >> ^ > > You can probably update the code to use the non-GNU version, that > should work both with musl, libc and any other new version that > sticks to the standard. > > Thanks. I could change 'doff' to 'th_off' in rpc.c:351, which is the name used in the BSD version of 'struct tcphdr', but then I'd have to define the macro __FAVOR_BSD in order to get the code to compile with uClibc (in contrast to musl, uClibc only exposes the GNU version by default). So, I don't see any advantages in doing that (changing the member name + defining __FAVOR_BSD) instead of simply defining _GNU_SOURCE. Besides, I've noticed that a similar issue has been solved before by using the same approach (commit fe1f2d58add1e56e651c43de8cd60db8123d49bb). Regards, Rodrigo -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html