Skip to content

Commit 40fefb2

Browse files
committed
compat: Fix __has_attribute usage
Fixes: #195 Link: #195
1 parent 0040f0f commit 40fefb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ struct module *find_module(const char *name)
774774
/* Copy from 294f69e662d1 ("compiler_attributes.h: Add 'fallthrough' pseudo
775775
* keyword for switch/case use") */
776776
#ifndef fallthrough
777-
# if __has_attribute(__fallthrough__)
777+
# if defined __has_attribute && __has_attribute(__fallthrough__)
778778
# define fallthrough __attribute__((__fallthrough__))
779779
# else
780780
# define fallthrough do {} while (0) /* fallthrough */

0 commit comments

Comments
 (0)