summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/emacs-module.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/emacs-module.h b/src/emacs-module.h
index 88cc38191b1..313dd58d690 100644
--- a/src/emacs-module.h
+++ b/src/emacs-module.h
@@ -35,9 +35,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
# define EMACS_NOEXCEPT
#endif
-#if defined __has_attribute && __has_attribute(__nonnull__)
+#ifdef __has_attribute
+#if __has_attribute(__nonnull__)
# define EMACS_ATTRIBUTE_NONNULL(...) __attribute__((__nonnull__(__VA_ARGS__)))
-#else
+#endif
+#endif
+#ifndef EMACS_ATTRIBUTE_NONNULL
# define EMACS_ATTRIBUTE_NONNULL(...)
#endif