Skip to content

Use the same parameter types as what's defined by GNU crypt_r()#150

Closed
joegsn wants to merge 1 commit intobcrypt-ruby:masterfrom
joegsn:master
Closed

Use the same parameter types as what's defined by GNU crypt_r()#150
joegsn wants to merge 1 commit intobcrypt-ruby:masterfrom
joegsn:master

Conversation

@joegsn
Copy link
Copy Markdown

@joegsn joegsn commented Mar 9, 2017

On a TrueOS-Desktop (devel release, based on FreeBSD 12-current) installation, it seems that building bcrypt-ruby would generate an error regarding the crypt_r function:

./ow-crypt.h:19:14: error: conflicting types for 'crypt_r'
extern char *crypt_r(__CONST char *key, __CONST char *setting, void *data);
             ^
/usr/include/unistd.h:497:7: note: previous declaration is here
char    *crypt_r(const char *, const char *, struct crypt_data *);

The official GNU crypt_r implementation defines the 3rd parameter as struct crypt_data * as well. The same function appears in FreeBSD, which is my target platform.

@kirillrdy
Copy link
Copy Markdown

its important to note that FreeBSD 12 will not be released until Feb 2019, until then we need to cater for FreeBSD-11 and 10

@kirillrdy
Copy link
Copy Markdown

Also, this change breaks bcrypt on macos

@kirillrdy kirillrdy mentioned this pull request Apr 14, 2018
@tjschuck
Copy link
Copy Markdown
Collaborator

tjschuck commented Dec 3, 2018

Your proposed changes are in the vendored C implementation that this library uses — please propose them upstream at https://www.openwall.com/crypt/, and then they can be pulled downstream into bcrypt-ruby.

Thanks!

@tjschuck tjschuck closed this Dec 3, 2018
@tjschuck tjschuck mentioned this pull request Jan 2, 2019
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.

3 participants