ports/devel/rubygem-concurrent-ruby-ext/files/patch-clang15
Po-Chuan Hsieh ec4c6e9a74
devel/rubygem-concurrent-ruby-ext: Fix build with Clang 15 and remove the workaround
atomic_reference.c:108:53: error: incompatible integer to pointer conversion passing 'VALUE' (aka 'unsigned long') to parameter of type 'void *' [-Wint-conversion]
  if (__sync_bool_compare_and_swap(&DATA_PTR(self), expect_value, new_value)) {
                                                    ^~~~~~~~~~~~
atomic_reference.c:108:67: error: incompatible integer to pointer conversion passing 'VALUE' (aka 'unsigned long') to parameter of type 'void *' [-Wint-conversion]
  if (__sync_bool_compare_and_swap(&DATA_PTR(self), expect_value, new_value)) {
                                                                  ^~~~~~~~~
2 errors generated.
2023-06-30 15:07:05 +08:00

11 lines
441 B
Text

--- ext/concurrent-ruby-ext/atomic_reference.c.orig 2023-06-13 15:43:55 UTC
+++ ext/concurrent-ruby-ext/atomic_reference.c
@@ -105,7 +105,7 @@ VALUE ir_compare_and_set(volatile VALUE self, VALUE ex
return Qtrue;
}
#else
- if (__sync_bool_compare_and_swap(&DATA_PTR(self), expect_value, new_value)) {
+ if (__sync_bool_compare_and_swap(&DATA_PTR(self), (void *) expect_value, (void *) new_value)) {
return Qtrue;
}
#endif