Browse Source
Merge pull request #37 from farrokhi/dev
Fix build on FreeBSD
pull/53/head
Luca Deri
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
4 deletions
-
Makefile
-
tuntap_freebsd.c
|
@ -4,7 +4,7 @@ N2N_OSNAME=$(shell uname -p) |
|
|
|
|
|
|
|
|
########
|
|
|
########
|
|
|
|
|
|
|
|
|
CC=gcc |
|
|
CC?=gcc |
|
|
DEBUG?=-g3 |
|
|
DEBUG?=-g3 |
|
|
#OPTIMIZATION?=-O2
|
|
|
#OPTIMIZATION?=-O2
|
|
|
WARN?=-Wall -Wshadow -Wpointer-arith -Wmissing-declarations -Wnested-externs |
|
|
WARN?=-Wall -Wshadow -Wpointer-arith -Wmissing-declarations -Wnested-externs |
|
|
|
@ -20,7 +20,7 @@ |
|
|
|
|
|
|
|
|
#ifdef __FreeBSD__ |
|
|
#ifdef __FreeBSD__ |
|
|
|
|
|
|
|
|
void tun_close(tuntap_dev *device); |
|
|
void tuntap_close(tuntap_dev *device); |
|
|
|
|
|
|
|
|
/* ********************************** */ |
|
|
/* ********************************** */ |
|
|
|
|
|
|
|
@ -78,7 +78,7 @@ int tuntap_open(tuntap_dev *device /* ignored */, |
|
|
|
|
|
|
|
|
fd = popen(buf, "r"); |
|
|
fd = popen(buf, "r"); |
|
|
if(fd < 0) { |
|
|
if(fd < 0) { |
|
|
tun_close(device); |
|
|
tuntap_close(device); |
|
|
return(-1); |
|
|
return(-1); |
|
|
} else { |
|
|
} else { |
|
|
int a, b, c, d, e, f; |
|
|
int a, b, c, d, e, f; |
|
|