summaryrefslogtreecommitdiff
path: root/src/bsd
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-05-11 23:39:12 +0000
committerChristian Pointner <equinox@anytun.org>2008-05-11 23:39:12 +0000
commit4cdfe669de129ee2287d6fa7d4f9e170ca04ab2f (patch)
tree8bee684539b40cf2a14660eaab6493b60fcf11ce /src/bsd
parentsame security fix for bsd device (diff)
fixed some thread safety bugs
Diffstat (limited to 'src/bsd')
-rw-r--r--src/bsd/tunDevice.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bsd/tunDevice.cpp b/src/bsd/tunDevice.cpp
index 5ad6ea7..e8a2849 100644
--- a/src/bsd/tunDevice.cpp
+++ b/src/bsd/tunDevice.cpp
@@ -90,7 +90,9 @@ TunDevice::TunDevice(const char* dev_name, const char* dev_type, const char* ifc
msg = "can't open device file (";
msg.append(device_file);
msg.append("): ");
- msg.append(strerror(errno));
+ char buf[NL_TEXTMAX];
+ strerror_r(errno, buf, NL_TEXTMAX);
+ msg.append(buf);
}
throw std::runtime_error(msg);
}