From: David Sommerseth Date: Wed, 11 Jan 2012 14:30:28 +0000 (+0100) Subject: New Windows build fixes X-Git-Tag: v2.3-alpha1~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edf8bbacd18d063e50c6a7f787f7e413d146af87;p=thirdparty%2Fopenvpn.git New Windows build fixes 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 . 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 Tested-by: Samuli Seppänen --- diff --git a/compat.c b/compat.c index cb599b0a0..2b1098e8f 100644 --- 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 bff67a73e..884f2b22d 100644 --- a/misc.c +++ b/misc.c @@ -36,7 +36,6 @@ #include "crypto.h" #include "route.h" #include "win32.h" -#include #include "memdbg.h"