$NetBSD: patch-ad,v 1.1 2007/01/09 23:36:45 wiz Exp $

--- flac123.h.orig	2005-02-25 05:52:02.000000000 +0000
+++ flac123.h
@@ -22,13 +22,24 @@
 #include <limits.h>
 #include <FLAC/all.h>
 
+/* by LEGACY_FLAC we mean pre-1.1.3 before FLAC__FileDecoder was merged into FLAC__StreamDecoder */
+#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8
+#define LEGACY_FLAC
+#else
+#undef LEGACY_FLAC
+#endif
+
 /* string widths for printing ID3 (vorbis) data in remote mode */
 #define VORBIS_TAG_LEN 30
 #define VORBIS_YEAR_LEN 4
 
 /* the main data structure of the program */
 typedef struct {
+#ifdef LEGACY_FLAC
     FLAC__FileDecoder *decoder;
+#else
+    FLAC__StreamDecoder *decoder;
+#endif
 
     /* bits, rate, channels, byte_format */
     ao_sample_format sam_fmt; /* input sample's true format */
