Hi Ed, The recent addition of crypt_r(3) to FreeBSD 12 has broken the build of port security/rubygem-bcrypt.
> current directory: > /wrkdirs/usr/ports/security/rubygem-bcrypt/work/stage/usr/local/lib/ruby/gems/2.2/gems/bcrypt-3.1.11/ext/mri > make "DESTDIR=" > compiling crypt_gensalt.c > compiling crypt.c > In file included from crypt.c:2: > ./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:499:7: note: previous declaration is here > char *crypt_r(const char *, const char *, struct crypt_data *); > ^ > 1 error generated. > *** Error code 1 > > I tried patching the file in the port, with the following: > --- ext/mri/ow-crypt.h.orig 2016-09-06 14:48:21 UTC > +++ ext/mri/ow-crypt.h > @@ -6,6 +6,8 @@ > #ifndef _OW_CRYPT_H > #define _OW_CRYPT_H > > +#include <sys/param.h> > + > #undef __CONST > #if defined __GNUC__ > #define __CONST __const > @@ -16,8 +18,10 @@ > > #ifndef __SKIP_GNU > extern char *crypt(__CONST char *key, __CONST char *setting); > +#if __FreeBSD_version < 1200002 > extern char *crypt_r(__CONST char *key, __CONST char *setting, void > *data); > #endif > +#endif > > #ifndef __SKIP_OW > extern char *crypt_rn(__CONST char *key, __CONST char *setting, > But then the build fails in wrapper.c instead: > wrapper.c:188:7: error: conflicting types for 'crypt_r' > char *crypt_r(__CONST char *key, __CONST char *setting, void *data) > ^ > /usr/include/unistd.h:499:7: note: previous declaration is here > char *crypt_r(const char *, const char *, struct crypt_data *); > ^ > 1 error generated. > *** Error code 1 > This file only defines crypt_r if the following is not true: > #if defined(__GLIBC__) && defined(_LIBC) > Any ideas on the right way to fix this? Thanks in advance, Ben -- From: Benjamin Woods woods...@gmail.com _______________________________________________ freebsd-ruby@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ruby To unsubscribe, send any mail to "freebsd-ruby-unsubscr...@freebsd.org"