Files
haikuports/haiku-apps/querywatcher/patches/querywatcher-1.4.patchset
Jerome Duval fc0936b040 Bump revisions for x86_64 rebuild after time_t change.
* a few apps needed build fix for time_t.
* disable compatibility packages for x86_64.
2017-06-27 15:46:25 +02:00

40 lines
1.1 KiB
Plaintext

From dcc3e419f837c268a497f94081c4ac0aa049f93c Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 24 Jun 2017 11:26:26 +0200
Subject: time_t isn't always an int32.
diff --git a/src/App.cpp b/src/App.cpp
index 25a4bac..b96b1b5 100644
--- a/src/App.cpp
+++ b/src/App.cpp
@@ -99,13 +99,21 @@ status_t ExtractQueryVolumes(BNode *node, vollist *volumes) {
// OpenTracker, that's it!
time_t created;
+ int64 created64;
+ int32 created32;
off_t capacity;
- for (int32 index = 0; msg.FindInt32("creationDate", index, &created) == B_OK;
+ for (int32 index = 0; msg.FindInt64("capacity", index, &capacity) == B_OK;
index++) {
-
- if ((msg.FindInt32("creationDate", index, &created) != B_OK)
- || (msg.FindInt64("capacity", index, &capacity) != B_OK))
+
+ if (msg.FindInt64("creationDate", index, &created64) != B_OK) {
+ if (msg.FindInt32("creationDate", index, &created32) != B_OK)
+ return B_ERROR;
+ created = created32;
+ } else
+ created = created64;
+
+ if (msg.FindInt64("capacity", index, &capacity) != B_OK)
return B_ERROR;
BVolume volume;
--
2.12.2