Commit 331a4ab
committed
Fix symbol collision with other native gems using libzstd
- Hide all ZSTD symbols by default using -fvisibility=hidden
- Use exported_symbols_list on macOS to explicitly control exported symbols
- Only export Init_zstdruby function required for Ruby extension initialization
- Add RUBY_FUNC_EXPORTED macro to Init_zstdruby function
This resolves symbol collision issues when using zstd-ruby alongside other
gems that dynamically link to system libzstd (e.g., rdkafka-ruby).
Fixes #1021 parent 5894b22 commit 331a4ab
3 files changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
0 commit comments