Skip to content

Commit f7fa188

Browse files
committed
Declare getlogin even if unistd.h is not available
Although MinGW provides this header but not the function, Windows version ruby provides the function.
1 parent b95ddef commit f7fa188

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ext/etc/etc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
#include <sys/types.h>
1515
#ifdef HAVE_UNISTD_H
1616
#include <unistd.h>
17-
#else
18-
char *getlogin(void);
1917
#endif
2018

2119
#ifdef HAVE_GETPWENT
@@ -56,6 +54,7 @@ static VALUE sGroup;
5654
# include <stdlib.h>
5755
# endif
5856
#endif
57+
char *getlogin(void);
5958

6059
#define RUBY_ETC_VERSION "1.4.2"
6160

0 commit comments

Comments
 (0)