summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/etc/etc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 0b3e5ffd5e..cf969038ff 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -14,6 +14,8 @@
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#else
+char *getlogin(void);
#endif
#ifdef HAVE_GETPWENT
@@ -54,7 +56,6 @@ static VALUE sGroup;
# include <stdlib.h>
# endif
#endif
-char *getlogin();
#define RUBY_ETC_VERSION "1.4.2"
@@ -68,7 +69,8 @@ void rb_deprecate_constant(VALUE mod, const char *name);
#ifndef HAVE_RB_IO_DESCRIPTOR
static int
-io_descriptor_fallback(VALUE io) {
+io_descriptor_fallback(VALUE io)
+{
rb_io_t *fptr;
GetOpenFile(io, fptr);
return fptr->fd;