diff --git a/src/include/newgal.h b/src/include/newgal.h index f09d7ffe..feae4f25 100644 --- a/src/include/newgal.h +++ b/src/include/newgal.h @@ -800,9 +800,9 @@ GAL_Surface* __drm_create_surface_from_name (GHANDLE video, uint32_t name, uint32_t drm_format, uint32_t pixels_off, uint32_t width, uint32_t height, uint32_t pitch); -GAL_Surface* __drm_create_surface_from_handle (GHANDLE video, - uint32_t handle, size_t size, uint32_t drm_format, uint32_t pixels_off, - uint32_t width, uint32_t height, uint32_t pitch); +//GAL_Surface* __drm_create_surface_from_handle (GHANDLE video, +// uint32_t handle, size_t size, uint32_t drm_format, uint32_t pixels_off, +// uint32_t width, uint32_t height, uint32_t pitch); GAL_Surface* __drm_create_surface_from_prime_fd (GHANDLE video, int prime_fd, size_t size, uint32_t drm_format, uint32_t pixels_off, diff --git a/src/misc/nposix.c b/src/misc/nposix.c index c67de974..0473fb3d 100644 --- a/src/misc/nposix.c +++ b/src/misc/nposix.c @@ -63,6 +63,8 @@ #include #endif +#include + #ifndef HAVE_STRDUP char* strdup (const char *string) { diff --git a/src/newgal/drm/drmvideo.c b/src/newgal/drm/drmvideo.c index 6ccc6ec9..b2b1fea4 100644 --- a/src/newgal/drm/drmvideo.c +++ b/src/newgal/drm/drmvideo.c @@ -1681,7 +1681,7 @@ static DrmSurfaceBuffer *drm_create_dumb_buffer(DrmVideoData* vdata, surface_buffer->handle, surface_buffer->width, surface_buffer->height, surface_buffer->pitch, - surface_buffer->size, surface_buffer->offset); + (long unsigned int)surface_buffer->size, (long unsigned int)surface_buffer->offset); /* prepare buffer for memory mapping */ memset(&mreq, 0, sizeof(mreq)); @@ -1810,7 +1810,7 @@ static DrmSurfaceBuffer *drm_create_dumb_buffer_from_prime_fd(DrmVideoData* vdat return NULL; } - _DBG_PRINTF("size got by calling lseek: %lu\n", size); + _DBG_PRINTF("size got by calling lseek: %lu\n", (long unsigned int)size); } ret = drmPrimeFDToHandle (vdata->dev_fd, prime_fd, &handle); diff --git a/src/newgdi/gdi.c b/src/newgdi/gdi.c index cbdf32ef..6e51e04f 100644 --- a/src/newgdi/gdi.c +++ b/src/newgdi/gdi.c @@ -3813,6 +3813,10 @@ HDC drmCreateDCFromNameEx (GHANDLE video, uint32_t name, uint32_t drm_format, return (HDC)pmem_dc; } +extern GAL_Surface* __drm_create_surface_from_handle (GHANDLE video, uint32_t handle, + unsigned long size, uint32_t drm_format, uint32_t pixels_off, + uint32_t width, uint32_t height, uint32_t pitch); + HDC drmCreateDCFromHandleEx (GHANDLE video, uint32_t handle, size_t size, uint32_t drm_format, off_t offset, uint32_t width, uint32_t height, uint32_t pitch) @@ -3824,7 +3828,7 @@ HDC drmCreateDCFromHandleEx (GHANDLE video, uint32_t handle, size_t size, return HDC_INVALID; LOCK (&__mg_gdilock); - surface = __drm_create_surface_from_handle (video, handle, size, + surface = (GAL_Surface *)__drm_create_surface_from_handle (video, handle, size, drm_format, offset, width, height, pitch); UNLOCK (&__mg_gdilock);