ports/sysutils/ruby-shadow/patches/patch-pwd_shadow_c

15 lines
415 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
--- 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;