Skip to contentSkip to conversation

lapi/ustat.h: Replace daddr_t with long

PATCH New Petr Vorel 2 participants 2 messages May 20, 2019 – May 21, 2019

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH 1/1 lapi/ustat.h: Replace daddr_t with long

From: Petr Vorel <[email protected]>

daddr_t is usually typedef to __kernel_daddr_t, which is int or long.
Using long as daddr_t is not defined at least on musl.

---
 include/lapi/ustat.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/lapi/ustat.h +1 -1
index 12c073582..030179c4a 100644
@@ -11,7 +11,7 @@
 # include <sys/ustat.h>
 #else
 struct ustat {
-	daddr_t f_tfree;
+	long f_tfree;
 	ino_t f_tinode;
 	char f_fname[6];
 	char f_fpack[6];
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/1 lapi/ustat.h: Replace daddr_t with long

Hi!

Quoted 2 lines

daddr_t is usually typedef to __kernel_daddr_t,
which is int or long.

Well the size must match, so unless you have checked that it's defined to int only in cases where sizeof(int) == sizeof(long) this change is not correct.

Signature · 2 lines
Cyril Hrubis
[email protected]