Skip to content

Commit

Permalink
- Fix compile when the compiler does not support the noreturn
Browse files Browse the repository at this point in the history
  attribute.
  • Loading branch information
wcawijngaards committed Jul 23, 2024
1 parent 5bea29b commit 8de5ae3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -7023,6 +7023,10 @@ printf "%s\n" "#define HAVE_ATTR_NORETURN 1" >>confdefs.h

printf "%s\n" "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h

else

printf "%s\n" "#define ATTR_NORETURN /**/" >>confdefs.h

fi


Expand Down
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ AC_MSG_RESULT($ac_cv_c_noreturn_attribute)
if test $ac_cv_c_noreturn_attribute = yes; then
AC_DEFINE(HAVE_ATTR_NORETURN, 1, [Whether the C compiler accepts the "noreturn" attribute])
AC_DEFINE(ATTR_NORETURN, [__attribute__((__noreturn__))], [apply the noreturn attribute to a function that exits the program])
else
AC_DEFINE(ATTR_NORETURN,[], [apply the noreturn attribute to a function that exits the program])
fi
])dnl End of CHECK_NORETURN_ATTRIBUTE

Expand Down
2 changes: 2 additions & 0 deletions doc/Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
- Merge #1110: Make fallthrough explicit for libworker.c.
- For #1110: Test for fallthrough attribute in configure and add
fallthrough attribute annotations.
- Fix compile when the compiler does not support the noreturn
attribute.

19 July 2024: Wouter
- Add dnstap-sample-rate that logs only 1/N messages, for high volume
Expand Down

0 comments on commit 8de5ae3

Please sign in to comment.