浏览代码

fix Windows build issues

Rich Megginson 21 年之前
父节点
当前提交
a71ecb02ba
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 1 0
      ldap/servers/plugins/uiduniq/Makefile
  2. 2 1
      ldap/servers/slapd/schema.c

+ 1 - 0
ldap/servers/plugins/uiduniq/Makefile

@@ -54,6 +54,7 @@ endif
 
 ifeq ($(ARCH), WINNT)
 DLL_LDFLAGS += -def:"./libuiduniq.def"
+EXTRA_LIBS += $(NSPRLINK)
 endif # WINNT
 
 ifeq ($(ARCH), AIX)

+ 2 - 1
ldap/servers/slapd/schema.c

@@ -4471,7 +4471,8 @@ schema_create_errormsg(
 		if ( NULL != name ) {
 			rc = PR_snprintf( errorbuf, errorbufsize, prefix, name );
 		}
-		if ( (rc >= 0) && (rc < errorbufsize) ) {
+		/* ok to cast here because rc is positive */
+		if ( (rc >= 0) && ((size_t)rc < errorbufsize) ) {
 			(void)PR_vsnprintf( errorbuf + rc, errorbufsize - rc, fmt, ap );
 		}
 		va_end( ap );