dahdi-linux: include linux/uaccess.h rather than asm/uaccess.h 270/head
authorSebastian Kemper <sebastian_ml@gmx.net>
Mon, 12 Feb 2018 20:57:04 +0000 (21:57 +0100)
committerSebastian Kemper <sebastian_ml@gmx.net>
Mon, 12 Feb 2018 20:57:06 +0000 (21:57 +0100)
commita3d53ad5629c04671e1dfda0871d276087213672
tree550b7c87aae6469890c7fb29064b9a4c28593c36
parent5eff04c674b0bd13bfcbf2f1e3cd4e5372a5efb3
dahdi-linux: include linux/uaccess.h rather than asm/uaccess.h

Starting with 4.12 there are module build errors due to the
arch-specific uaccess.h using a macro defined in the generic include.
The generic include has been around since 2.6.18 and has always included
asm/uaccess.h, so switch to using the generic include for all kernels
which have it.

Example build failure:

    CC [M]  /data/bowl-builder/mips64_octeon/build/sdk/build_dir/target-mips64_octeon_64_musl/linux-octeon/dahdi-linux-2.11.1-20180111/drivers/dahdi/wcb4xxp/base.o
  In file included from ../dahdi-linux-2.11.1-20180111/drivers/dahdi/wcb4xxp/base.c:38:0:
  ./arch/mips/include/asm/uaccess.h: In function 'eva_kernel_access':
  ./arch/mips/include/asm/uaccess.h:91:9: error: implicit declaration of function 'uaccess_kernel' [-Werror=implicit-function-declaration]
    return uaccess_kernel();
           ^
  cc1: some warnings being treated as errors

The same can currently be seen on arc_archs where also kernel 4.14.18 is
used.

The patch just follows what Ubuntu's Seth Forshee suggested for openafs,
which ran into the same problem. The commit message is largely just
copied from Seth's commit message as well :)

The issue has been reported to upstream here:

https://issues.asterisk.org/jira/browse/DAHLIN-360

The same patch has been uploaded there.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
libs/dahdi-linux/patches/110-fix-uaccess_h-include.patch [new file with mode: 0644]