Skip to content

Commit 7e8b081

Browse files
authored
Merge pull request #9798 from lealem47/arm32_kernel
Fix SIZEOF_LONG default for 32-bit Linux kernel modules
2 parents 69b28cd + 63c4b29 commit 7e8b081

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

.wolfssl_known_macro_extras

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,7 @@ __SDCC_VERSION_MAJOR
10591059
__SDCC_VERSION_MINOR
10601060
__SDCC_VERSION_PATCH
10611061
__SIZEOF_INT128__
1062+
__SIZEOF_LONG__
10621063
__SIZEOF_LONG_LONG__
10631064
__STDC_NO_ATOMICS__
10641065
__STDC_VERSION__

wolfssl/wolfcrypt/settings.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3775,10 +3775,18 @@ extern void uITRON4_free(void *p) ;
37753775
#define WOLFSSL_NO_GETPID
37763776
#endif /* WOLFSSL_NO_GETPID */
37773777
#ifndef SIZEOF_LONG
3778-
#define SIZEOF_LONG 8
3778+
#ifdef __SIZEOF_LONG__
3779+
#define SIZEOF_LONG __SIZEOF_LONG__
3780+
#else
3781+
#define SIZEOF_LONG 8
3782+
#endif
37793783
#endif
37803784
#ifndef SIZEOF_LONG_LONG
3781-
#define SIZEOF_LONG_LONG 8
3785+
#ifdef __SIZEOF_LONG_LONG__
3786+
#define SIZEOF_LONG_LONG __SIZEOF_LONG_LONG__
3787+
#else
3788+
#define SIZEOF_LONG_LONG 8
3789+
#endif
37823790
#endif
37833791
#define CHAR_BIT 8
37843792
#ifndef WOLFSSL_SP_DIV_64

0 commit comments

Comments
 (0)