From f6b2ca587cc8163ff028f6f76bf585d09342b1c6 Mon Sep 17 00:00:00 2001 From: mio Date: Sat, 28 Sep 2024 15:43:09 +1000 Subject: Fix FTBFS when xinelib <= 1.2.9 Resolves: https://mirror.git.trinitydesktop.org/gitea/TDE/tdemultimedia/issues/83 Signed-off-by: mio --- xine_artsplugin/audio_fifo_out.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/xine_artsplugin/audio_fifo_out.c b/xine_artsplugin/audio_fifo_out.c index 3087bce0..bc64277f 100644 --- a/xine_artsplugin/audio_fifo_out.c +++ b/xine_artsplugin/audio_fifo_out.c @@ -22,7 +22,7 @@ #include #include -#if (XINE_MAJOR_VERSION >= 1) && (XINE_MINOR_VERSION >= 2) +#if (XINE_MAJOR_VERSION > 1) || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION >= 2) #include #include #endif @@ -52,7 +52,7 @@ typedef struct fifo_driver_s { int fifo_flush; int fifo_delay; -#if (XINE_MAJOR_VERSION >= 1) && (XINE_MINOR_VERSION >= 2) +#if (XINE_MAJOR_VERSION > 1) || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION >= 2) config_values_t *config; xine_t *xine; #endif @@ -292,7 +292,7 @@ static int ao_fifo_control( ao_driver_t *this_gen, int cmd, ... ) return 0; } -#if (XINE_MAJOR_VERSION >= 1) && (XINE_MINOR_VERSION >= 2) +#if (XINE_MAJOR_VERSION > 1) || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION >= 2) static fifo_driver_t * _ao_driver = NULL; typedef struct fifo_class_s { @@ -354,9 +354,18 @@ static ao_driver_t * _arts_open(audio_driver_class_t *driver_class, const void * return &_ao_driver->ao_driver; } +#if (XINE_MAJOR_VERSION > 1) || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION > 2) || \ + (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION == 2 && XINE_SUB_VERSION >= 10) + static void *_arts_plugin_class_init(xine_t *xine, const void *data) { + +#else + +static void *_arts_plugin_class_init(xine_t *xine, void *data) { + +#endif fifo_class_t *cl; - + cl = (fifo_class_t *) malloc(sizeof(fifo_class_t)); if (!cl) return NULL; cl->driver_class.open_plugin = _arts_open; @@ -365,7 +374,7 @@ static void *_arts_plugin_class_init(xine_t *xine, const void *data) { cl->driver_class.dispose = _arts_class_dispose; cl->config = xine->config; cl->xine = xine; - + return cl; } @@ -388,7 +397,7 @@ xine_audio_port_t *init_audio_out_plugin( xine_t *xine, xine_arts_audio *audio, xine->verbosity = 1; #endif -#if (XINE_MAJOR_VERSION >= 1) && (XINE_MINOR_VERSION >= 2) +#if (XINE_MAJOR_VERSION > 1) || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION >= 2) xine_audio_port_t *ret; xine_register_plugins(xine, arts_xine_plugin_info); ret = xine_open_audio_driver( xine, "arts", audio ); -- cgit v1.2.1