blob: d356b818eda8a2e53320bb11094f82c7a1a06d57 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
https://github.com/openzfs/zfs/pull/17294 (merged)
From 634c172ee89f5303493a75dc7ff55e0a355b503a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Salvador=20Rufo?=
<salvador.joseluis@gmail.com>
Date: Fri, 2 May 2025 23:49:25 +0200
Subject: [PATCH] tests: fix `S_IFMT` undeclared at `statx.c`
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
`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
---
tests/zfs-tests/cmd/statx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/zfs-tests/cmd/statx.c b/tests/zfs-tests/cmd/statx.c
index 89939f6efb40..1acc7e58c5ce 100644
--- a/tests/zfs-tests/cmd/statx.c
+++ b/tests/zfs-tests/cmd/statx.c
@@ -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;
|