Skip to content

Commit

Permalink
More OSX workarounds.
Browse files Browse the repository at this point in the history
  • Loading branch information
haegar committed Feb 7, 2013
1 parent e7cf1c8 commit 291c86f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions main.c
Expand Up @@ -99,12 +99,10 @@ main (int argc,char *argv[])
return 1;
}

#if !defined(BSD) && !defined(__APPLE__)
if (!tun_check_or_create()) {
log_err("Error - unable to create tun device\n");
return 1;
}
#endif

err = !config_init(config);
if (err) return err;
Expand Down
4 changes: 2 additions & 2 deletions tun.c
Expand Up @@ -22,7 +22,7 @@ tun_gnu_dev_makedev (unsigned int major, unsigned int minor)
static bool
tun_create_dev(void)
{
#ifndef WIN32
#if !defined(BSD) && !defined(__APPLE__) && !defined(WIN32)
mode_t mask = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
if (!EXISTS(TUN_PATH) && (NOERR != mkdir(TUN_PATH, mask))) {
return false;
Expand All @@ -37,7 +37,7 @@ tun_create_dev(void)
bool
tun_check_or_create(void)
{
#ifndef WIN32
#if !defined(BSD) && !defined(__APPLE__) && !defined(WIN32)
if (!EXISTS(TUN_DEV)) {
log_info("tun device %s does't exists - trying to create it.", TUN_DEV);
return tun_create_dev();
Expand Down

0 comments on commit 291c86f

Please sign in to comment.