Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with redefined offsetof in GCC 10.2.0 #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions inc/com_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
/*****************************************************************************
* basic types
*****************************************************************************/
#if defined(WIN32) || defined(WIN64)
#if defined(_MSC_VER)
typedef __int8 s8;
typedef unsigned __int8 u8;
typedef __int16 s16;
Expand All @@ -75,7 +75,7 @@ typedef signed short s16;
typedef unsigned short u16;
typedef signed int s32;
typedef unsigned int u32;
#if defined(X86_64) && !defined(_MSC_VER) /* for 64bit-Linux */
#if defined(__X86_64__) && !defined(_MSC_VER) /* for 64bit-Linux */
typedef signed long s64;
typedef unsigned long u64;
#else
Expand Down Expand Up @@ -161,7 +161,7 @@ typedef int BOOL;
#define com_mset_x128(dst,v,size) memset((dst), (v), (size))
#define com_mcmp(dst,src,size) memcmp((dst), (src), (size))

#if defined(__GNUC__)
#if !defined(__GNUC__)
#define offsetof(s,m) __builtin_offsetof(s,m)
#endif

Expand Down Expand Up @@ -278,4 +278,4 @@ typedef union uavs3e_union128_t {
#endif


#endif /* _COM_PORT_H_ */
#endif /* _COM_PORT_H_ */