Skip to content

Commit

Permalink
tests: fix build with fresh glibc
Browse files Browse the repository at this point in the history
Workaround additional incompatibility between <sys/stat.h> and
<asm/stat.h> introduced by glibc-2.27.9000-566-gfd70af4.

* tests/xstatx.c (statx, statx_timestamp): Redefine before the inclusion
of <sys/stat.h> to avoid conflicts between definitions provided by the
linux kernel headers and the GNU libc.
  • Loading branch information
ldv-alt committed Jul 15, 2018
1 parent 2b96d4c commit 3dbffb7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/xstatx.c
Expand Up @@ -64,10 +64,14 @@ typedef off_t libc_off_t;

# define stat libc_stat
# define stat64 libc_stat64
# define statx libc_statx
# define statx_timestamp libc_statx_timestamp
# include <fcntl.h>
# include <sys/stat.h>
# undef stat
# undef statx_timestamp
# undef statx
# undef stat64
# undef stat

# undef st_atime
# undef st_mtime
Expand Down

0 comments on commit 3dbffb7

Please sign in to comment.