src: fix compilation for glibc version 2.27.9000-36.fc29 and newer
...
As recent glibc versions (>= 2.27.9000-36.fc29) also define 'struct
statx' which is also defined in linux/stat.h, compilation fails with
error:
| In file included from ../dt-utils-2018.05.0/src/crypto/digest.c:24:
| [..]/usr/include/linux/stat.h:56:8: error: redefinition of 'struct statx_timestamp'
| struct statx_timestamp {
| ^~~~~~~~~~~~~~~
| In file included from [..]/usr/include/sys/stat.h:446,
| from ../dt-utils-2018.05.0/src/dt/common.h:15,
| from ../dt-utils-2018.05.0/src/crypto/digest.c:19:
| [..]/usr/include/bits/statx.h:25:8: note: originally defined here
| struct statx_timestamp
| ^~~~~~~~~~~~~~~
| In file included from ../dt-utils-2018.05.0/src/crypto/digest.c:24:
| [..]/usr/include/linux/stat.h:99:8: error: redefinition of 'struct statx'
| struct statx {
| ^~~~~
| In file included from [..]/usr/include/sys/stat.h:446,
| from ../dt-utils-2018.05.0/src/dt/common.h:15,
| from ../dt-utils-2018.05.0/src/crypto/digest.c:19:
| [..]/usr/include/bits/statx.h:36:8: note: originally defined here
| struct statx
| ^~~~~
The linux/stat.h originates from the code that was copied from barebox
but is not explicitly required to be linux/stat.h instead of sys/stat.h
and we do not actually use struct statx.
Thus it is safe to simply replace occurrences of linux/stat.h by
sys/stat.h to fix compilation.
Signed-off-by: Enrico Joerns <ejo@pengutronix.de>
Enrico Joerns
authored
on 5 Sep 2018
Enrico Jorns
committed
on 10 Sep 2018