summaryrefslogtreecommitdiffstats
path: root/libhb/fifo.c
diff options
context:
space:
mode:
authorBradley Sepos <[email protected]>2017-12-06 20:05:18 -0500
committerBradley Sepos <[email protected]>2017-12-06 21:28:04 -0500
commit9837e7605080422c84b3f486ae2c939f434a2d4b (patch)
treea93b07cb269d6e264218c8e15d3d2771cf8d99ce /libhb/fifo.c
parent32148d715fdc9970b9add10855f8689d84240126 (diff)
FreeBSD 11.1 compatibility.
Diffstat (limited to 'libhb/fifo.c')
-rw-r--r--libhb/fifo.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libhb/fifo.c b/libhb/fifo.c
index 798179415..f2175e90c 100644
--- a/libhb/fifo.c
+++ b/libhb/fifo.c
@@ -13,8 +13,12 @@
#endif
#ifndef SYS_DARWIN
+#if defined( SYS_FREEBSD ) || defined ( __FreeBSD__ )
+#include <stdlib.h>
+#else
#include <malloc.h>
#endif
+#endif
#define FIFO_TIMEOUT 200
//#define HB_FIFO_DEBUG 1
@@ -391,7 +395,7 @@ hb_buffer_t * hb_buffer_init_internal( int size )
if (size)
{
-#if defined( SYS_DARWIN ) || defined( SYS_FREEBSD ) || defined( SYS_MINGW )
+#if defined( SYS_DARWIN ) || defined( SYS_FREEBSD ) || defined ( __FreeBSD__ ) || defined( SYS_MINGW )
b->data = malloc( b->alloc );
#elif defined( SYS_CYGWIN )
/* FIXME */
@@ -744,7 +748,7 @@ hb_image_t * hb_image_init(int pix_fmt, int width, int height)
{
return NULL;
}
-#if defined( SYS_DARWIN ) || defined( SYS_FREEBSD ) || defined( SYS_MINGW )
+#if defined( SYS_DARWIN ) || defined( SYS_FREEBSD ) || defined ( __FreeBSD__ ) || defined( SYS_MINGW )
image->data = malloc(size);
#elif defined( SYS_CYGWIN )
/* FIXME */
@@ -785,7 +789,7 @@ hb_image_t * hb_buffer_to_image(hb_buffer_t *buf)
{
hb_image_t *image = calloc(1, sizeof(hb_image_t));
-#if defined( SYS_DARWIN ) || defined( SYS_FREEBSD ) || defined( SYS_MINGW )
+#if defined( SYS_DARWIN ) || defined( SYS_FREEBSD ) || defined ( __FreeBSD__ ) || defined( SYS_MINGW )
image->data = malloc( buf->size );
#elif defined( SYS_CYGWIN )
/* FIXME */