Edit

IABSD.fr/ports/sysutils/ruby-shadow/patches

Branch :

  • Show log

    Commit

  • Author : jasper
    Date : 2015-11-19 15:01:47
    Hash : 6de6fdd7
    Message : getpwnam -> getpwnam_shadow

  • patch-pwd_shadow_c
  • $OpenBSD: patch-pwd_shadow_c,v 1.6 2015/11/19 15:01:47 jasper Exp $
    --- pwd/shadow.c.orig	Thu Nov 19 15:51:37 2015
    +++ pwd/shadow.c	Thu Nov 19 15:56:27 2015
    @@ -92,7 +92,11 @@ rb_shadow_getspnam(VALUE self, VALUE name)
     
       if( TYPE(name) != T_STRING )
         rb_raise(rb_eException,"argument must be a string.");
    +#ifdef __OpenBSD__
    +  entry = getpwnam_shadow(StringValuePtr(name));
    +#else
       entry = getpwnam(StringValuePtr(name));
    +#endif
     
       if( entry == NULL )
         return Qnil;