diff options
Diffstat (limited to 'builtin/sys')
-rw-r--r-- | builtin/sys/types.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/builtin/sys/types.h b/builtin/sys/types.h index 3f8de955e0..01fc1a7749 100644 --- a/builtin/sys/types.h +++ b/builtin/sys/types.h @@ -1,4 +1,4 @@ -/* Copyright 2022 The ChromiumOS Authors. +/* Copyright 2022 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -9,4 +9,11 @@ /* Data type for POSIX style clock() implementation */ typedef long clock_t; +/* There is a GCC macro for a size_t type, but not for a ssize_t type. + * The following construct convinces GCC to make __SIZE_TYPE__ signed. + */ +#define unsigned signed +typedef __SIZE_TYPE__ ssize_t; +#undef unsigned + #endif /* __CROS_EC_SYS_TYPES_H__ */ |