From b35fce94e4a30f670aaebb15e9202a0ba9fdf1ef Mon Sep 17 00:00:00 2001 From: "nelsonb%netscape.com" Date: Mon, 19 Jan 2004 01:05:53 +0000 Subject: [PATCH] Make this code build on Windows as well as Unix. --- security/nss/cmd/pk11util/pk11util.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/security/nss/cmd/pk11util/pk11util.c b/security/nss/cmd/pk11util/pk11util.c index 0ee3d8986b9a..e77098202453 100644 --- a/security/nss/cmd/pk11util/pk11util.c +++ b/security/nss/cmd/pk11util/pk11util.c @@ -36,13 +36,16 @@ #include #if defined(WIN32) +#undef __STDC__ +#include "fcntl.h" #include "io.h" +#else +#include +#include #endif #include "secutil.h" -#include -#include #include "nspr.h" #include "prtypes.h" @@ -379,7 +382,7 @@ CK_RV ArrayTemplate(char *bp, char *attributes) char *cur = ap; ConstType type; - ap = index(ap,','); + ap = strchr(ap,','); if (ap) { *ap++ = 0; }