summaryrefslogtreecommitdiff
path: root/audio/flac/patches/patch-ai
blob: 5c0c833b57728ea79899c2a6952f00572d364e8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$NetBSD: patch-ai,v 1.1 2004/11/16 12:05:54 sketch Exp $

--- ./src/libFLAC++/file_encoder.cpp.orig	2004-11-15 18:20:18.800446000 +0000
+++ ./src/libFLAC++/file_encoder.cpp	2004-11-15 18:26:18.841164000 +0000
@@ -168,7 +168,7 @@
 		bool File::set_metadata(FLAC::Metadata::Prototype **metadata, unsigned num_blocks)
 		{
 			FLAC__ASSERT(is_valid());
-#ifdef _MSC_VER
+#if (defined _MSC_VER) || (defined __SUNPRO_CC)
 			// MSVC++ can't handle:
 			// ::FLAC__StreamMetadata *m[num_blocks];
 			// so we do this ugly workaround
@@ -180,7 +180,7 @@
 				// we can get away with this since we know the encoder will only correct the is_last flags
 				m[i] = const_cast< ::FLAC__StreamMetadata*>((::FLAC__StreamMetadata*)metadata[i]);
 			}
-#ifdef _MSC_VER
+#if (defined _MSC_VER) || (defined __SUNPRO_CC)
 			// complete the hack
 			const bool ok = (bool)::FLAC__file_encoder_set_metadata(encoder_, m, num_blocks);
 			delete [] m;
@@ -368,5 +368,5 @@
 			instance->progress_callback(bytes_written, samples_written, frames_written, total_frames_estimate);
 		}
 
-	};
+	}
 };