tests: fix S_IFMT undeclared at statx.c

`S_IFMT` is declared in `sys/stat.h`, but we cannot include this header
because it redeclares the `statx` function with different argument
types. Therefore, we define `S_IFMT` ourselves, in the same way as the
other definitions.

Reviewed-by: Rob Norris <robn@despairlabs.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
Closes #17293
Closes #17294
This commit is contained in:
José Luis Salvador Rufo 2025-05-02 23:49:25 +02:00 committed by GitHub
parent a6cca8a7da
commit 634c172ee8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -109,6 +109,9 @@ _statx(int fd, const char *path, int flags, unsigned int mask, void *stx)
#ifndef STATX_DIOALIGN
#define STATX_DIOALIGN (1<<13)
#endif
#ifndef S_IFMT
#define S_IFMT 0170000
#endif
typedef struct {
int64_t tv_sec;