diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-01-08 15:34:50 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-01-08 15:34:50 -0800 |
commit | 8e2db3f50402b454294f788ea0c4bd81defddd5a (patch) | |
tree | 9a399b1304270e165890d48f1efb211d5859bbac | |
parent | b872b942bad2f681eb7091565aae3233098b6cf8 (diff) |
Fixes compiler warnings:
vloaduc.c: In function ‘verite_load_ucfile’:
vloaduc.c:35:17: warning: implicit declaration of function ‘lswaps’; did you mean ‘swaps’? [-Wimplicit-function-declaration]
35 | #define SW16(x) lswaps(x)
| ^~~~~~
vloaduc.c:103:6: note: in expansion of macro ‘SW16’
103 | sz=SW16(ehdr.e_phentsize);
| ^~~~
vloaduc.c:34:17: warning: implicit declaration of function ‘lswapl’; did you mean ‘swapl’? [-Wimplicit-function-declaration]
34 | #define SW32(x) lswapl(x)
| ^~~~~~
vloaduc.c:113:42: note: in expansion of macro ‘SW32’
113 | if (seek_and_read_hdr(fd, pphdr, SW32(ehdr.e_phoff), sz, num)) {
| ^~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/vloaduc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vloaduc.c b/src/vloaduc.c index 5c6aab0..8ef44b1 100644 --- a/src/vloaduc.c +++ b/src/vloaduc.c @@ -31,8 +31,13 @@ #ifdef X_LITTLE_ENDIAN /* maybe swap word */ -#define SW32(x) lswapl(x) -#define SW16(x) lswaps(x) +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 24 +# define SW32(x) lswapl(x) +# define SW16(x) lswaps(x) +#else +# define SW32(x) bswap_32(x) +# define SW16(x) bswap_16(x) +#endif #else /* BIG_ENDIAN */ #define SW32(x) (x) #define SW16(x) (x) |