$OpenBSD: patch-contrib_lua-torch_torch7_lib_TH_THGeneral_c,v 1.2 2018/07/08 14:13:56 sthen Exp $

Index: contrib/lua-torch/torch7/lib/TH/THGeneral.c
--- contrib/lua-torch/torch7/lib/TH/THGeneral.c.orig
+++ contrib/lua-torch/torch7/lib/TH/THGeneral.c
@@ -13,14 +13,12 @@
 
 #if defined(__APPLE__)
 #include <malloc/malloc.h>
-#endif
-
-#if defined(__linux__)
+#elif defined(__linux__)
 #include <malloc.h>
-#endif
-
-#if defined(__FreeBSD__)
+#elif defined(__FreeBSD__)
 #include <malloc_np.h>
+#else
+#include <stdlib.h>
 #endif
 
 /* Torch Error Handling */
