diff --git a/src/sbbs3/sbbsecho.c b/src/sbbs3/sbbsecho.c
index f7cefa8c7a3df4ce863e5322a9e3c33cdfccb0bf..38ae7a58bd6e19d572729f5793f1d40c518a26c3 100644
--- a/src/sbbs3/sbbsecho.c
+++ b/src/sbbs3/sbbsecho.c
@@ -422,7 +422,7 @@ size_t read_echostats(const char* fname, echostat_t **echostat)
 	iniFreeStringList(echoes);
 	iniFreeStringList(ini);
 
-	lprintf(LOG_DEBUG, "Read %lu echo statistics from %s", echo_count, fname);
+	lprintf(LOG_DEBUG, "Read %lu echo statistics from %s", (ulong)echo_count, fname);
 	return echo_count;
 }
 
@@ -455,7 +455,7 @@ void fwrite_echostat_msg(FILE* fp, echostat_msg_t msg, const char* prefix)
 	if(msg.reply_id[0])	fprintf(fp, "%s.reply_id = %s\n"	, prefix, msg.reply_id);
 	if(msg.pid[0])		fprintf(fp, "%s.pid = %s\n"			, prefix, msg.pid);
 	if(msg.tid[0])		fprintf(fp, "%s.tid = %s\n"			, prefix, msg.tid);
-	fprintf(fp, "%s.length = %lu\n"							, prefix, msg.length);
+	fprintf(fp, "%s.length = %lu\n"							, prefix, (ulong)msg.length);
 	fprintf(fp, "%s.msg_time = %s\n"						, prefix, iniTimeStr(msg.msg_time));
 	if(msg.msg_tz[0])	fprintf(fp, "%s.msg_tz = %s\n"		, prefix, msg.msg_tz);
 	fprintf(fp, "%s.localtime = %s\n"						, prefix, iniTimeStr(msg.localtime));
@@ -1510,7 +1510,7 @@ void netmail_arealist(enum arealist_type type, fidoaddr_t addr, const char* to)
 		}
 	}
 	lprintf(LOG_INFO,"AreaFix (for %s) Created response netmail with %s (%lu areas)"
-		, smb_faddrtoa(&addr, NULL), title, strListCount(area_list));
+		, smb_faddrtoa(&addr, NULL), title, (ulong)strListCount(area_list));
 	strListFree(&area_list);
 }
 
@@ -1834,10 +1834,10 @@ void alter_areas(str_list_t add_area, str_list_t del_area, fidoaddr_t addr, cons
 	fclose(afileout);
 	if(added)
 		lprintf(LOG_DEBUG, "AreaFix (for %s) Added links to %lu areas in %s"
-			,smb_faddrtoa(&addr,NULL), added, cfg.areafile);
+			,smb_faddrtoa(&addr,NULL), (ulong)added, cfg.areafile);
 	if(deleted)
 		lprintf(LOG_DEBUG, "AreaFix (for %s) Removed links to %lu areas in %s"
-			,smb_faddrtoa(&addr,NULL), deleted, cfg.areafile);
+			,smb_faddrtoa(&addr,NULL), (ulong)deleted, cfg.areafile);
 	if(added || deleted) {
 		if(cfg.areafile_backups == 0 || !backup(cfg.areafile, cfg.areafile_backups, /* ren: */TRUE))
 			delfile(cfg.areafile, __LINE__);					/* Delete AREAS.BBS */
@@ -2950,7 +2950,7 @@ void cleanup(void)
 	char		path[MAX_PATH+1];
 
 	if(bad_areas != NULL) {
-		lprintf(LOG_DEBUG, "Writing %lu areas to %s", strListCount(bad_areas), cfg.badareafile);
+		lprintf(LOG_DEBUG, "Writing %lu areas to %s", (ulong)strListCount(bad_areas), cfg.badareafile);
 		FILE* fp = fopen(cfg.badareafile, "wt");
 		if(fp == NULL) {
 			lprintf(LOG_ERR, "ERROR %d (%s) opening %s", errno, strerror(errno), cfg.badareafile);
@@ -5492,7 +5492,7 @@ void find_stray_packets(void)
 		}
 		if(fread(&pkthdr,sizeof(pkthdr),1,fp)!=1) {
 			lprintf(LOG_ERR,"ERROR reading header (%lu bytes) from stray packet: %s"
-				,sizeof(pkthdr), packet);
+				,(ulong)sizeof(pkthdr), packet);
 			fclose(fp);
 			delfile(packet, __LINE__);
 			continue;
@@ -5535,7 +5535,7 @@ void find_stray_packets(void)
 	}
 	if(g.gl_pathc)
 		lprintf(LOG_DEBUG, "%lu stray outbound packets (%lu total pkts) found in %s"
-			,listCountNodes(&outpkt_list), g.gl_pathc, cfg.temp_dir);
+			,listCountNodes(&outpkt_list), (ulong)g.gl_pathc, cfg.temp_dir);
 	globfree(&g);
 }
 
@@ -5619,7 +5619,7 @@ void import_packets(const char* inbound, nodecfg_t* inbox, bool secure)
 		if(fread(&pkthdr,sizeof(pkthdr),1,fidomsg)!=1) {
 			fclose(fidomsg);
 			lprintf(LOG_ERR,"ERROR line %d reading %lu bytes from %s",__LINE__
-				,sizeof(pkthdr),packet);
+				,(ulong)sizeof(pkthdr),packet);
 			rename_bad_packet(packet);
 			continue;
 		}
diff --git a/src/sbbs3/services.c b/src/sbbs3/services.c
index f8c543efc386de68824fd58a130291696965b124..bed766fae50aeb5e4c2f4eaaa1db6060059dad4e 100644
--- a/src/sbbs3/services.c
+++ b/src/sbbs3/services.c
@@ -2143,7 +2143,7 @@ void DLLCALL services_thread(void* arg)
 					if((client=malloc(sizeof(service_client_t)))==NULL) {
 						FREE_AND_NULL(udp_buf);
 						lprintf(LOG_CRIT,"%04d %s !ERROR allocating %lu bytes of memory for service_client"
-							,client_socket, service[i].protocol, sizeof(service_client_t));
+							,client_socket, service[i].protocol, (ulong)sizeof(service_client_t));
 						close_socket(client_socket);
 						continue;
 					}
diff --git a/src/sbbs3/websrvr.c b/src/sbbs3/websrvr.c
index 254e3ebe7413e30e7100d57de294933a1b4db04c..73fd8130b926b0b67b0aef58aacc1f38f43ad54d 100644
--- a/src/sbbs3/websrvr.c
+++ b/src/sbbs3/websrvr.c
@@ -1992,7 +1992,7 @@ static named_string_t** read_ini_list(char* path, char* section, char* desc
 		COUNT_LIST_ITEMS(list,i);
 		if(i)
 			lprintf(LOG_DEBUG,"Read %lu %s from %s section of %s"
-				,i,desc,section==NULL ? "root":section,path);
+				,(ulong)i,desc,section==NULL ? "root":section,path);
 	} else
 		lprintf(LOG_WARNING, "Error %d opening %s", errno, path);
 	return(list);
@@ -5964,7 +5964,7 @@ int read_post_data(http_session_t * session)
 					/* FREE()d in close_request */
 					p=realloc(session->req.post_data, s);
 					if(p==NULL) {
-						lprintf(LOG_CRIT,"%04d !ERROR Allocating %lu bytes of memory",session->socket,session->req.post_len);
+						lprintf(LOG_CRIT,"%04d !ERROR Allocating %lu bytes of memory",session->socket, (ulong)session->req.post_len);
 						send_error(session,__LINE__,"413 Request entity too large");
 						if(fp) fclose(fp);
 						return(FALSE);
@@ -6021,14 +6021,14 @@ int read_post_data(http_session_t * session)
 				if(s < (MAX_POST_LEN+1) && (session->req.post_data=malloc((size_t)(s+1))) != NULL)
 					session->req.post_len=recvbufsocket(session,session->req.post_data,s);
 				else  {
-					lprintf(LOG_CRIT,"%04d !ERROR Allocating %lu bytes of memory",session->socket,s);
+					lprintf(LOG_CRIT,"%04d !ERROR Allocating %lu bytes of memory",session->socket, (ulong)s);
 					send_error(session,__LINE__,"413 Request entity too large");
 					return(FALSE);
 				}
 			}
 		}
 		if(session->req.post_len != s)
-				lprintf(LOG_DEBUG,"%04d !ERROR Browser said they sent %lu bytes, but I got %lu",session->socket,s,session->req.post_len);
+				lprintf(LOG_DEBUG,"%04d !ERROR Browser said they sent %lu bytes, but I got %lu",session->socket, (ulong)s, (ulong)session->req.post_len);
 		if(session->req.post_len > s)
 			session->req.post_len = s;
 		session->req.post_data[session->req.post_len]=0;
@@ -6922,7 +6922,7 @@ void DLLCALL web_server(void* arg)
 			if(session==NULL) {
 				/* FREE()d at the start of the session thread */
 				if((session=malloc(sizeof(http_session_t)))==NULL) {
-					lprintf(LOG_CRIT,"!ERROR allocating %lu bytes of memory for http_session_t", sizeof(http_session_t));
+					lprintf(LOG_CRIT,"!ERROR allocating %lu bytes of memory for http_session_t", (ulong)sizeof(http_session_t));
 					continue;
 				}
 				memset(session, 0, sizeof(http_session_t));