From 74cc9865939d97cfafeb3aad94dc1596773ef82e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 30 May 2010 13:21:00 +0100 Subject: [PATCH] cdparanoiasrc: fix build on OSX by #undef-ing VERSION before including system headers On OSX the cdparanoia headers include IOKit framework headers (in particular SCSICmds_INQUIRY_Definitions.h) which define a structure that has a member named VERSION, so we must #undef VERSION before including those for things to compile on OSX. Fixes #609918. --- ext/cdparanoia/gstcdparanoiasrc.c | 5 ++--- ext/cdparanoia/gstcdparanoiasrc.h | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ext/cdparanoia/gstcdparanoiasrc.c b/ext/cdparanoia/gstcdparanoiasrc.c index 5ea182d2a7..864ebc7302 100644 --- a/ext/cdparanoia/gstcdparanoiasrc.c +++ b/ext/cdparanoia/gstcdparanoiasrc.c @@ -529,13 +529,12 @@ plugin_init (GstPlugin * plugin) bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif - return TRUE; } - GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, "cdparanoia", "Read audio from CD in paranoid mode", - plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) + plugin_init, GST_PLUGINS_BASE_VERSION, "LGPL", GST_PACKAGE_NAME, + GST_PACKAGE_ORIGIN) diff --git a/ext/cdparanoia/gstcdparanoiasrc.h b/ext/cdparanoia/gstcdparanoiasrc.h index 6cec23c4c9..e61dff88bc 100644 --- a/ext/cdparanoia/gstcdparanoiasrc.h +++ b/ext/cdparanoia/gstcdparanoiasrc.h @@ -27,6 +27,12 @@ G_BEGIN_DECLS #define size16 gint16 #define size32 gint32 +/* on OSX the cdparanoia headers include IOKit framework headers (in particular + * SCSICmds_INQUIRY_Definitions.h) which define a structure that has a member + * named VERSION, so we must #undef VERSION here for things to compile on OSX */ +static char GST_PLUGINS_BASE_VERSION[] = VERSION; +#undef VERSION + #ifdef CDPARANOIA_HEADERS_IN_DIR #include #include