From 6c245a673ad0f2b895efc4d3cf8d03ddae764bb7 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Sun, 18 Mar 2018 19:32:54 +0000
Subject: [PATCH] Fix Win32 link failure (e.g. unresolved getsockopt): when
 iniFile functions are used, that requires a socket lib too. util builds (that
 don't need the .ini file functions), they #define NO_SOCKET_SUPPORT, so
 exclude the user/####.ini support functions in that case too.

---
 src/sbbs3/userdat.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/sbbs3/userdat.c b/src/sbbs3/userdat.c
index a6a4cbc383..401356a1b1 100644
--- a/src/sbbs3/userdat.c
+++ b/src/sbbs3/userdat.c
@@ -3215,6 +3215,8 @@ BOOL DLLCALL set_sysop_availability(scfg_t* scfg, BOOL available)
 	return remove(sysop_available_semfile(scfg)) == 0;
 }
 
+#if !defined(NO_SOCKET_SUPPORT)	/* This brings in xpdev which then requires socket lib */
+
 /************************************/
 /* user .ini file get/set functions */
 /************************************/
@@ -3268,3 +3270,5 @@ BOOL DLLCALL user_set_time_property(scfg_t* scfg, unsigned user_number, const ch
 	iniCloseFile(fp);
 	return result != NULL;
 }
+
+#endif /* !NO_SOCKET_SUPPORT */
\ No newline at end of file
-- 
GitLab