diff options
author | Bhupesh Sharma <bhupesh.sharma@linaro.org> | 2022-10-29 19:13:12 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-09 14:37:56 +0300 |
commit | c5edb757baa99f6d30180b1a4b4f81f7e7f92217 (patch) | |
tree | 4ceb43944953863c87baf5e0ca343f9ab4bcf20a /drivers/usb/fotg210/Makefile | |
parent | dced88922c1179dfa2664690318d4cba57ebffb5 (diff) | |
download | linux-c5edb757baa99f6d30180b1a4b4f81f7e7f92217.tar.xz |
tools: usb: ffs-aio-example: Fix build error with aarch64-*-gnu-gcc toolchain(s)
The tools/usb/aio_simple.c file when cross-compiled with
aarch64-*-gnu-gcc toolchain(s) leads to the following errors:
aio_simple.c:30:10: fatal error: endian.h: No such file or directory
30 | #include <endian.h>
| ^~~~~~~~~~
aio_simple.c:88:14: note: (near initialization for
'descriptors.fs_count')
aio_simple.c:110:14: error: initializer element is not constant
110 | .hs_count = htole32(3),
| ^~~~~~~
aio_simple.c:110:14: note: (near initialization for
'descriptors.hs_count')
aio_simple.c:124:22: error: initializer element is not constant
124 | .wMaxPacketSize = htole16(512),
| ^~~~~~~
aio_simple.c:124:22: note: (near initialization for
'descriptors.hs_descs.bulk_sink.wMaxPacketSize')
Fix these compilation issues by:
- Switching to _DEFAULT_SOURCE:
_BSD_SOURCE is deprecated and gives a build warning. Let's use
_DEFAULT_SOURCE instead.
- Currently this file uses library htole16/32 function calls.
Replace these with equivalent 'cpu_to_le16/32' calls.
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Link: https://lore.kernel.org/r/20221029161312.171165-1-bhupesh.sharma@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/fotg210/Makefile')
0 files changed, 0 insertions, 0 deletions