Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hiredis_connection.c: Rename unix to is_unix #147

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

jlledom
Copy link
Contributor

@jlledom jlledom commented Nov 2, 2023

The hiredis_reconnect function is defined like this:

static VALUE hiredis_reconnect(VALUE self, VALUE unix, VALUE ssl_param)

However, unix is defined as a macro on some implementations, I found the issue in RHEL7 for ppc64le architecture.

When the macro is defined, the preprocessor replaces it by a 1, and the function definition is transformed to this:

static VALUE hiredis_reconnect(VALUE self, VALUE 1, VALUE ssl_param) {

Which, on compile time fails with this error:

<command-line>:0:6: error: expected ';', ',' or ')' before numeric constant
hiredis_connection.c:595:50: note: in expansion of macro 'unix'
 static VALUE hiredis_reconnect(VALUE self, VALUE unix, VALUE ssl_param) {
                                                  ^

Just renaming the parameter fixes the issue for me.

@byroot byroot merged commit a25f053 into redis-rb:master Nov 2, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants