Skip to content

Commit

Permalink
Fix compilation error with C23
Browse files Browse the repository at this point in the history
This fallback already defined at ruby/internal/stdbool.h
  • Loading branch information
hsbt committed Oct 8, 2024
1 parent d9c6fdc commit acf911f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ext/json/ext/generator/generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@

#include "ruby.h"

#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
#else
/* This is the fallback definition from Ruby 3.0.5. */
#ifndef RBIMPL_STDBOOL_H
# /* This is the fallback definition from Ruby 3.0.5. */
#elif defined(HAVE_STDBOOL_H)
# include <stdbool.h>
#elif !defined(HAVE__BOOL)
typedef unsigned char _Bool
#define bool _Bool
#endif
Expand Down

0 comments on commit acf911f

Please sign in to comment.