From 47cb789332e80d51699ab95ef610a69f5556d44d Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 13 Jul 2023 00:34:45 +0900 Subject: [PATCH] [ruby/etc] Declare `getlogin` even if unistd.h is not available Although MinGW provides this header but not the function, Windows version ruby provides the function. https://github.com/ruby/etc/commit/f7fa1884fa --- ext/etc/etc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/etc/etc.c b/ext/etc/etc.c index cf969038ff..78657b43d0 100644 --- a/ext/etc/etc.c +++ b/ext/etc/etc.c @@ -14,8 +14,6 @@ #include #ifdef HAVE_UNISTD_H #include -#else -char *getlogin(void); #endif #ifdef HAVE_GETPWENT @@ -56,6 +54,7 @@ static VALUE sGroup; # include # endif #endif +char *getlogin(void); #define RUBY_ETC_VERSION "1.4.2"