pkgsrc/audio/libvisual0.2-plugins/patches/patch-ac
dholland 2abbf58ff6 Fix broken build on NetBSD due to mremap() API difference, and while
here fix a couple nearby 64-bit glitches.
2008-08-02 18:08:15 +00:00

27 lines
977 B
Text

$NetBSD: patch-ac,v 1.1 2008/08/02 18:08:15 dholland Exp $
--- plugins/input/mplayer/input_mplayer.c~ 2005-01-08 17:06:17.000000000 -0500
+++ plugins/input/mplayer/input_mplayer.c 2008-08-02 14:03:30.000000000 -0400
@@ -147,7 +147,7 @@ int inp_mplayer_init( VisPluginData *plu
priv->mmap_area = mmap( 0, sizeof( mplayer_data_t ),
PROT_READ, MAP_SHARED, priv->fd, 0 );
- visual_log_return_val_if_fail( (int)priv->mmap_area != -1, -1 );
+ visual_log_return_val_if_fail( priv->mmap_area != (mplayer_data_t *)-1, -1 );
if ( priv->mmap_area->nch == 0 )
{
@@ -169,9 +169,12 @@ int inp_mplayer_init( VisPluginData *plu
}
priv->mmap_area = mremap( priv->mmap_area, sizeof( mplayer_data_t ),
+#ifdef __NetBSD__
+ NULL,
+#endif
sizeof( mplayer_data_t ) + priv->mmap_area->bs,
0 );
- if ( (int)priv->mmap_area == -1 )
+ if ( priv->mmap_area == (mplayer_data_t *)-1 )
{
visual_log( VISUAL_LOG_CRITICAL,
"Could not mremap() area from file '%s' " \