aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/HttpdInternal.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/output/HttpdInternal.hxx')
-rw-r--r--src/output/HttpdInternal.hxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/output/HttpdInternal.hxx b/src/output/HttpdInternal.hxx
index ba8c9a5b6..a9d24e840 100644
--- a/src/output/HttpdInternal.hxx
+++ b/src/output/HttpdInternal.hxx
@@ -129,6 +129,19 @@ struct HttpdOutput final : private ServerSocket {
HttpdOutput(EventLoop &_loop);
~HttpdOutput();
+#if GCC_CHECK_VERSION(4,6) || defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Winvalid-offsetof"
+#endif
+
+ static constexpr HttpdOutput *Cast(audio_output *ao) {
+ return (HttpdOutput *)((char *)ao - offsetof(HttpdOutput, base));
+ }
+
+#if GCC_CHECK_VERSION(4,6) || defined(__clang__)
+#pragma GCC diagnostic pop
+#endif
+
bool Init(const config_param &param, Error &error);
void Finish() {