diff --git a/src/uifc/uifc.h b/src/uifc/uifc.h
index 561f5a41235ba52331668b69a73643529d4daf52..bda36f00940d607dd09d7363ed4c9d8d6ad833a2 100644
--- a/src/uifc/uifc.h
+++ b/src/uifc/uifc.h
@@ -37,7 +37,6 @@
 
 #include <time.h>
 #include <fcntl.h>
-#include <alloc.h>
 #include <ctype.h>
 #include <stdio.h>
 #include <string.h>
@@ -51,6 +50,9 @@
     #include <io.h>
     #include <conio.h>
 #endif
+#if !defined(__FreeBSD__)
+	#include <malloc.h>		/* malloc prototype */
+#endif
 #if (defined(__unix__) || defined(_WIN32)) && !defined(__FLAT__)
     #define __FLAT__
 #else