summaryrefslogtreecommitdiff
path: root/libfec
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2021-07-29 13:08:24 -0700
committerDan Willemsen <dwillemsen@google.com>2021-07-29 13:12:17 -0700
commitacb1c17e31effdb77d4b18b98150538abca51a2b (patch)
treeee4f37c3d2d0b7971c7831ebad4017908e34b42b /libfec
parent20100be3f3121a84e8577af093438a6bec752875 (diff)
downloadextras-acb1c17e31effdb77d4b18b98150538abca51a2b.tar.gz
Stop using syscall() to get tid
This call is deprecated on recent MacOS versions, use our portable wrapper in libbase instead. Change-Id: I3e247738434f621f83192d4cd6772dbf55f8bed0
Diffstat (limited to 'libfec')
-rw-r--r--libfec/fec_private.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/libfec/fec_private.h b/libfec/fec_private.h
index bbd8b281..199f8017 100644
--- a/libfec/fec_private.h
+++ b/libfec/fec_private.h
@@ -29,6 +29,7 @@
#include <string>
#include <vector>
+#include <android-base/threads.h>
#include <crypto_utils/android_pubkey.h>
#include <fec/ecc.h>
#include <fec/io.h>
@@ -181,8 +182,8 @@ extern int verity_parse_header(fec_handle *f, uint64_t offset);
/* warnings, errors, debug output */
#ifdef FEC_NO_KLOG
#define __log(func, type, format, args...) \
- fprintf(stderr, "fec: <%d> " type ": %s: " format "\n", \
- (int)syscall(SYS_gettid), __FUNCTION__, ##args)
+ fprintf(stderr, "fec: <%" PRIu64 "> " type ": %s: " format "\n", \
+ android::base::GetThreadId(), __FUNCTION__, ##args)
#else
#include <cutils/klog.h>