ARM: 8445/1: fix vdsomunge not to depend on glibc specific byteswap.h
authorH. Nikolaus Schaller <hns@goldelico.com>
Fri, 16 Oct 2015 21:19:06 +0000 (22:19 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 19 Oct 2015 16:07:32 +0000 (17:07 +0100)
commit8a603f91cc4848ab1a0458bc065aa9f64322e123
tree8ca745820e600069fe1abd061273d88f63736e7d
parent868e87ccda2461cafd4a0d39f1486eb8f4a9a6f9
ARM: 8445/1: fix vdsomunge not to depend on glibc specific byteswap.h

If the host toolchain is not glibc based then the arm kernel build
fails with

  HOSTCC  arch/arm/vdso/vdsomunge
  arch/arm/vdso/vdsomunge.c:48:22: fatal error: byteswap.h: No such file or directory

Observed: with omap2plus_defconfig and compile on Mac OS X with arm ELF
cross-compiler.

Reason: byteswap.h is a glibc only header.

Solution: replace by private byte-swapping macros (taken from
arch/mips/boot/elf2ecoff.c and kindly improved by Russell King)

Tested to compile on Mac OS X 10.9.5 host.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/vdso/vdsomunge.c