diff --git a/engine/client/sys_linux.c b/engine/client/sys_linux.c index 0ecc155b4..24e74f90b 100644 --- a/engine/client/sys_linux.c +++ b/engine/client/sys_linux.c @@ -776,8 +776,8 @@ static int Sys_EnumerateFiles2 (const char *truepath, int apathofs, const char * return false; } } - else - Con_DPrintf("Stat failed for \"%s\"\n", file); //can happen with dead symlinks +// else +// Con_DPrintf("Stat failed for \"%s\"\n", file); //can happen with dead symlinks } } } while(1); diff --git a/engine/common/bothdefs.h b/engine/common/bothdefs.h index e19ba62ae..fd749677b 100644 --- a/engine/common/bothdefs.h +++ b/engine/common/bothdefs.h @@ -124,6 +124,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #undef HUFFNETWORK #undef SUPPORT_ICE #undef WEBCLIENT + #undef MULTITHREAD #undef LOADERTHREAD #undef PACKAGEMANAGER #undef PACKAGE_PK3 @@ -133,6 +134,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #undef PACKAGE_DZIP #undef AVAIL_XZDEC #undef AVAIL_GZDEC + #undef SUBSERVERS + #undef HAVE_LEGACY + #undef IPLOG #else #if defined(SERVERONLY) && defined(CLIENTONLY) #undef CLIENTONLY //impossible build. assume the config had CLIENTONLY and they tried building a dedicated server @@ -425,7 +429,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //FIXME: HAVE_WINSSPI does not work as a server. //FIXME: advertising dtls without a valid certificate will probably bug out if a client tries to auto-upgrade. //FIXME: we don't cache server certs - #define HAVE_DTLS + #ifndef MASTERONLY + #define HAVE_DTLS + #endif #endif #if defined(USE_SQLITE) || defined(USE_MYSQL) diff --git a/engine/common/common.c b/engine/common/common.c index 259fc788d..4ebed5e48 100644 --- a/engine/common/common.c +++ b/engine/common/common.c @@ -1131,7 +1131,7 @@ void MSG_WriteAngle (sizebuf_t *sb, float f) Sys_Error("MSG_WriteAngle: undefined network primitive size"); } - +#if defined(HAVE_CLIENT) || defined(HAVE_SERVER) int MSG_ReadSize16 (sizebuf_t *sb) { unsigned short ssolid = MSG_ReadShort(); @@ -1196,7 +1196,6 @@ int COM_EncodeSize(vec3_t mins, vec3_t maxs) return solid; } -#if defined(HAVE_CLIENT) || defined(HAVE_SERVER) void MSG_WriteEntity(sizebuf_t *sb, unsigned int entnum) { if (entnum > MAX_EDICTS) @@ -6476,6 +6475,7 @@ char *VARGS va(const char *format, ...) return string[bufnum]; } +#if defined(HAVE_CLIENT) || defined(HAVE_SERVER) #ifdef NQPROT //for compat with dpp7 protocols, or dp gamecode that neglects to properly precache particles. void COM_Effectinfo_Enumerate(int (*cb)(const char *pname)) @@ -6662,6 +6662,7 @@ unsigned int COM_RemapMapChecksum(model_t *model, unsigned int checksum) #endif return checksum; } +#endif static char Base64_Encode(int byt) { diff --git a/engine/common/log.c b/engine/common/log.c index c900e9d13..88800ec60 100644 --- a/engine/common/log.c +++ b/engine/common/log.c @@ -227,7 +227,7 @@ void Con_Log (const char *s) } -#ifndef CLIENTONLY +#ifdef HAVE_SERVER //still to add stuff at: //connects //disconnects diff --git a/engine/common/net_ssl_gnutls.c b/engine/common/net_ssl_gnutls.c index 7b941f1a6..a0d9a340a 100644 --- a/engine/common/net_ssl_gnutls.c +++ b/engine/common/net_ssl_gnutls.c @@ -234,7 +234,7 @@ static int (VARGS *qgnutls_certificate_set_x509_key_mem)(gnutls_certificate_cre static int (VARGS *qgnutls_certificate_get_x509_key)(gnutls_certificate_credentials_t res, unsigned index, gnutls_x509_privkey_t *key); static void (VARGS *qgnutls_certificate_free_credentials)(gnutls_certificate_credentials_t sc); -#ifdef GNUTLS_DYNAMIC +#if defined(GNUTLS_DYNAMIC) && defined(HAVE_DTLS) static int VARGS fallback_gnutls_set_default_priority_append(gnutls_session_t session, const char *add_prio, const char **err_pos, unsigned flags) { return qgnutls_set_default_priority(session); @@ -450,9 +450,11 @@ static qboolean Init_GNUTLS(void) if (!hmod) return false; +#ifdef HAVE_DTLS qgnutls_set_default_priority_append = Sys_GetAddressForName(hmod, "gnutls_set_default_priority_append"); if (!qgnutls_set_default_priority_append) qgnutls_set_default_priority_append = fallback_gnutls_set_default_priority_append; +#endif #else #define GNUTLS_FUNC(name) q##name = name; #define GNUTLS_FUNCPTR(name) q##name = &name; @@ -760,6 +762,7 @@ static int QDECL SSL_CheckCert(gnutls_session_t session) return GNUTLS_E_CERTIFICATE_ERROR; } +#ifdef HAVE_DTLS static int QDECL SSL_CheckFingerprint(gnutls_session_t session) { //actual certificate doesn't matter so long as it matches the hash we expect. gnutlsfile_t *file = qgnutls_session_get_ptr (session); @@ -786,6 +789,7 @@ VFS_CLOSE(f); Con_DPrintf(CON_ERROR "%s: rejecting certificate\n", file->certname); return GNUTLS_E_CERTIFICATE_ERROR; } +#endif //return 1 to read data. //-1 for error diff --git a/engine/server/sv_sys_unix.c b/engine/server/sv_sys_unix.c index c6fcf0145..4177c52a5 100644 --- a/engine/server/sv_sys_unix.c +++ b/engine/server/sv_sys_unix.c @@ -1203,8 +1203,8 @@ static int Sys_EnumerateFiles2 (const char *truepath, int apathofs, const char * } else if (lstat(file, &st) == 0) ;//okay, so bad symlink, just mute it - else - fprintf(stderr, "Stat failed for \"%s\"\n", file); +// else +// fprintf(stderr, "Stat failed for \"%s\"\n", file); } } } while(1);