Re: [B.A.T.M.A.N.] [PATCHv12 2/4] batman-adv: Add multicast optimization support for bridged setups

Sven Eckelmann
2016-04-24T07:07:48Z

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

On Tuesday 19 April 2016 04:22:18 Linus Lüssing wrote:
[...]
> > Why must there be a special compat-sources/*.c file for these tiny
> > functions?
>
> I think it is necessary because of the missing stubs in 3.16.
> 3.16 has the function declarations in if_bridge.h but without
> function definitions if the kernel is build without bridge
> (snooping) support.
>
> Adding simple inline functions in compat-include/linux/if_bridge.h
> for these functions would yield a compile-time error for the 3.16
> kernel without bridge (snooping) support case: The declaration is
> always there in 3.16's if_bridge.h include which would clash
> with a self-made inline function in our compat-include's
> if_bridge.h.

Couldn't you #define the names to a different name which you then use. An
example for this can be found at

https://git.open-mesh.org/batman-adv.git/blob/HEAD:/compat-include/linux/ethtool.h

Kind regards,
Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]