--- cyassl/ctaocrypt/settings.h
+++ cyassl/ctaocrypt/settings.h
@@ -454,6 +454,48 @@
 
 /* Place any other flags or defines here */
 
+#define FREETZ
+#if defined(FREETZ)
+
+/*
+	Workaround for cyassl bug:
+	 The following defines are used while compiling cyassl library (either by adding them to AM_CFLAGS or by setting them in config.h).
+	 They however are not set in any exported header file -> an application compiled against cyassl may fail to compile or even be miscompiled because of this.
+*/
+
+	#if !defined(SIZEOF_LONG)
+	#define SIZEOF_LONG 4
+	#endif
+
+	#if !defined(SIZEOF_LONG_LONG)
+	#define SIZEOF_LONG_LONG 8
+	#endif
+
+	#if !defined(OPENSSL_EXTRA)
+	#define OPENSSL_EXTRA
+	#endif
+
+	#if !defined(USE_FAST_MATH)
+	#define USE_FAST_MATH
+	#endif
+
+	#if !defined(BIG_SESSION_CACHE)
+	#define BIG_SESSION_CACHE
+	#endif
+
+	#if !defined(NO_HC128)
+	#define NO_HC128
+	#endif
+
+	#if !defined(NO_RABBIT)
+	#define NO_RABBIT
+	#endif
+
+	#if !defined(NO_PSK)
+	#define NO_PSK
+	#endif
+
+#endif /* FREETZ */
 
 #ifdef __cplusplus
     }   /* extern "C" */
