blob: dba4494b91369bfea67c6fd113a5956393833191 [file] [log] [blame]
Andrew Geissler475cb722020-07-10 16:00:51 -05001From 55e11765af2bdc8adfac87dab1fb2682f7e6c236 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 9 Jun 2020 22:10:28 -0700
4Subject: [PATCH] Define daddr_t if __DADDR_T_TYPE is not defined
Andrew Geissler5a43b432020-06-13 10:46:56 -05005
6glibc defined daddr_t but musl does not, ideally it should not be used
7and simple int type is enough. However, its better to leave glibc behavior
8as it is and only define it to int if daddr_t is not provided by libc
9
10Upstream-Status: Pending
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
Andrew Geissler475cb722020-07-10 16:00:51 -050013
14---
15 stress-ng.h | 4 ++++
16 1 file changed, 4 insertions(+)
17
18diff --git a/stress-ng.h b/stress-ng.h
19index 1a66293..802dc25 100644
Andrew Geissler5a43b432020-06-13 10:46:56 -050020--- a/stress-ng.h
21+++ b/stress-ng.h
Andrew Geissler475cb722020-07-10 16:00:51 -050022@@ -3763,6 +3763,10 @@ struct shim_statx {
Andrew Geissler5a43b432020-06-13 10:46:56 -050023 uint64_t __spare2[14];
24 };
25
26+#ifndef __DADDR_T_TYPE
27+typedef int daddr_t;
28+#endif
29+
30 /* old ustat struct */
31 struct shim_ustat {
Andrew Geissler475cb722020-07-10 16:00:51 -050032 #if defined(HAVE_DADDR_T)