summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorUchio Kondo <[email protected]>2020-04-28 01:52:56 +0900
committerHiroshi Mimaki <[email protected]>2020-05-01 16:52:11 +0900
commit6e13467ce8d59334639045a710ddd93193d643e5 (patch)
tree50272eaf07eded26883571c0ca7f6a1be59ae6cf
parent508ac2030e1f1218d7a6b4e140c0d7bf8c7b7dc3 (diff)
downloadmruby-6e13467ce8d59334639045a710ddd93193d643e5.tar.gz
mruby-6e13467ce8d59334639045a710ddd93193d643e5.zip
Fix typo and include location
-rw-r--r--mrbgems/mruby-io/test/mruby_io_test.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mrbgems/mruby-io/test/mruby_io_test.c b/mrbgems/mruby-io/test/mruby_io_test.c
index 1cbb1057c..2200b750b 100644
--- a/mrbgems/mruby-io/test/mruby_io_test.c
+++ b/mrbgems/mruby-io/test/mruby_io_test.c
@@ -1,7 +1,6 @@
#include <mruby/common.h>
#include <sys/types.h>
#include <errno.h>
-#include <assert.h>
#if defined(_WIN32) || defined(_WIN64)
@@ -54,11 +53,12 @@ mkdtemp(char *temp)
#include <sys/socket.h>
#include <unistd.h>
#include <sys/un.h>
+ #include <assert.h>
+ #include <fcntl.h>
#endif
#include <sys/stat.h>
#include <stdlib.h>
-#include <fcntl.h>
#include "mruby.h"
#include "mruby/array.h"
@@ -71,7 +71,7 @@ int wd_save;
int socket_available_p;
#if !defined(_WIN32) && !defined(_WIN64)
-static int mrb_io_socket_abailable()
+static int mrb_io_socket_available()
{
int fd, retval = 1;
struct sockaddr_un sun0;
@@ -114,7 +114,7 @@ mrb_io_test_io_setup(mrb_state *mrb, mrb_value self)
int fd2, fd3;
struct sockaddr_un sun0;
- if(!(socket_available_p = mrb_io_socket_abailable())) {
+ if(!(socket_available_p = mrb_io_socket_available())) {
char *tmpdir;
wd_save = open(".", O_DIRECTORY);
tmpdir = getenv("TMPDIR");