aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/stress-ng/stress-ng/no_daddr_t.patch
blob: dba4494b91369bfea67c6fd113a5956393833191 (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
From 55e11765af2bdc8adfac87dab1fb2682f7e6c236 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 9 Jun 2020 22:10:28 -0700
Subject: [PATCH] Define daddr_t if __DADDR_T_TYPE is not defined

glibc defined daddr_t but musl does not, ideally it should not be used
and simple int type is enough. However, its better to leave glibc behavior
as it is and only define it to int if daddr_t is not provided by libc

Upstream-Status: Pending

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 stress-ng.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/stress-ng.h b/stress-ng.h
index 1a66293..802dc25 100644
--- a/stress-ng.h
+++ b/stress-ng.h
@@ -3763,6 +3763,10 @@ struct shim_statx {
 	uint64_t __spare2[14];
 };
 
+#ifndef __DADDR_T_TYPE
+typedef int daddr_t;
+#endif
+
 /* old ustat struct */
 struct shim_ustat {
 #if defined(HAVE_DADDR_T)