Skip to content

Commit 4e6d9ea

Browse files
committed
Fix SIZEOF_LONG default for 32-bit Linux kernel modules
1 parent 2971c70 commit 4e6d9ea

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

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)