Skip to content

Fix build with older Apple Clang #80

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

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
15 changes: 8 additions & 7 deletions lsqpack.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,16 @@ SOFTWARE.
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))

#ifdef _MSC_VER
# define FALL_THROUGH
#endif

#ifndef FALL_THROUGH
# if defined __has_attribute && __has_attribute (fallthrough)
# define FALL_THROUGH __attribute__ ((fallthrough))
# if 201710L < __STDC_VERSION__
# define FALL_THROUGH [[fallthrough]]
# elif ((__GNUC__ >= 7 && !defined __clang__) \
|| (defined __apple_build_version__ \
? __apple_build_version__ >= 12000000 \
: __clang_major__ >= 10))
# define FALL_THROUGH __attribute__((fallthrough))
# else
# define FALL_THROUGH
# define FALL_THROUGH ((void)0)
# endif
#endif

Expand Down