On Wednesday 06 May 2015 21:29:22 Linus Lüssing wrote:
> Signed-off-by: Linus Lüssing <[email protected]>
> ---
>  Makefile                              |    4 +
>  compat-include/linux/igmp.h           |   13 ++
>  compat-include/linux/skbuff.h         |   14 +++
>  compat-include/net/addrconf.h         |   13 ++
>  compat-include/net/ip6_checksum.h     |   18 +++
>  compat-include/net/ipv6.h             |   17 +++
>  compat-include/net/mld.h              |   52 ++++++++
>  compat-sources/Makefile               |    3 +
>  compat-sources/net/core/skbuff.c      |  136 +++++++++++++++++++++
>  compat-sources/net/ipv4/igmp.c        |  169 ++++++++++++++++++++++++++
>  compat-sources/net/ipv6/mcast_snoop.c |  216
> +++++++++++++++++++++++++++++++++ 11 files changed, 655 insertions(+)
>  create mode 100644 compat-include/linux/igmp.h
>  create mode 100644 compat-include/net/addrconf.h
>  create mode 100644 compat-include/net/ip6_checksum.h
>  create mode 100644 compat-include/net/ipv6.h
>  create mode 100644 compat-include/net/mld.h
>  create mode 100644 compat-sources/Makefile
>  create mode 100644 compat-sources/net/core/skbuff.c
>  create mode 100644 compat-sources/net/ipv4/igmp.c
>  create mode 100644 compat-sources/net/ipv6/mcast_snoop.c

The split header files were only there to fix the problem of the header mess 
which couldn't be resolved with a single compat.h that forced a specific 
include order. It is not really necessary to have the same for the source 
files. Maybe your solution is good or maybe not. Only the future will tell. :)

The other solution would be more like backports [1]. They seem to use one 
backport-/compat-*.c file for each kernel they support and introduced features 
which they require. So all kernel < 3.19 will build the content of 
backport-3.19.c to get the functions introduced by this version. But there are 
also some larger ones for special stuff. Maybe you can check this out and 
decide what you like more.

To the copyright stuff... hm, if you didn't write it yourself then the 
copyright stuff from the original source should be there. backports [1] 
doesn't seem to do this very well. They have for example used larger portions 
from files marked as copyright Yu Zhao <[email protected]> but have only the 
copyright header with Copyright (c) 2013  Luis R. Rodriguez <mcgrof@do-not-
panic.com>. Not sure that I can give a good answer here. Maybe someone else 
has an opinion about this part

To the Makefile integration: I did it with compat.c similar before dropping 
it. The only difference was that I only had one file

    export batman-adv-y += ../../compat.o

So you solution seems to be fine.

Kind regards,
        Sven


[1] https://www.kernel.org/pub/linux/kernel/projects/backports/stable/

Reply via email to