]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
New Windows build fixes
authorDavid Sommerseth <davids@redhat.com>
Wed, 11 Jan 2012 14:30:28 +0000 (15:30 +0100)
committerDavid Sommerseth <davids@redhat.com>
Wed, 11 Jan 2012 14:30:28 +0000 (15:30 +0100)
compat.c: In basename() a typo had gone undetected through the review process,
and also that the declaration was a little bit different from what's defined in
compat.h

misc.c: commit 9449e6a9eba30c9ed054f57d630a88c9f087080f adds #include <unistd.h>.
This breaks building on Windows.  As unistd.h is already loaded via syshead.h on
systems where unistd.h exists, we don't need it here.

Signed-off-by: David Sommerseth <davids@redhat.com>
Tested-by: Samuli Seppänen <samuli@openvpn.net>
compat.c
misc.c

index cb599b0a0f6b1b6a4275d30702da50e6d351c6c5..2b1098e8f9505cc4c7b350d9b8ff5d995e2b6b56 100644 (file)
--- a/compat.c
+++ b/compat.c
@@ -117,9 +117,9 @@ dirname (char *path)
  * This version is extended to handle both / and \ in path names
  */
 char *
-basename (const char *filename)
+basename (char *filename)
 {
-  char *p = strrchr (filenamem, '/');
+  char *p = strrchr (filename, '/');
   if (!p) {
     /* If NULL, check for \ instead ... might be Windows a path */
     p = strrchr (filename, '\\');
diff --git a/misc.c b/misc.c
index bff67a73eccaf90900cd297388dfa0374e7228c4..884f2b22ddc26e9840ef1cfb73a2ef2c89898753 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -36,7 +36,6 @@
 #include "crypto.h"
 #include "route.h"
 #include "win32.h"
-#include <unistd.h>
 
 #include "memdbg.h"