Skip to content

Commit 2f5d20e

Browse files
Fix build on 32-bit x86
We need the regparm decoration in the definition, not just the declaration. Signed-off-by: Thiago Macieira <[email protected]>
1 parent 2dcf42f commit 2f5d20e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cborparser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static inline uint64_t get64(const uint8_t *ptr)
163163
return cbor_ntohll(result);
164164
}
165165

166-
CborError _cbor_value_extract_number(const uint8_t **ptr, const uint8_t *end, uint64_t *len)
166+
CBOR_INTERNAL_API_CC CborError _cbor_value_extract_number(const uint8_t **ptr, const uint8_t *end, uint64_t *len)
167167
{
168168
uint8_t additional_information = **ptr & SmallValueMask;
169169
++*ptr;

src/compilersupport_p.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
#endif
8585
#define DBL_DECIMAL_DIG_STR STRINGIFY(DBL_DECIMAL_DIG)
8686

87-
#if defined(__GNUC__) && defined(__i386__)
87+
#if defined(__GNUC__) && defined(__i386__) && !defined(__iamcu__)
8888
# define CBOR_INTERNAL_API_CC __attribute__((regparm(3)))
8989
#elif defined(_MSC_VER) && defined(_M_IX86)
9090
# define CBOR_INTERNAL_API_CC __fastcall

0 commit comments

Comments
 (0)