Permalink
Browse files

Fix PPC compilation of NuppeDecoder and NuppelRecorder

Patch from Lawrence Rust.
(cherry picked from commit 933475e)
  • Loading branch information...
Mark Kendall
Mark Kendall committed Feb 18, 2011
1 parent c66dceb commit 4ce4707321aeec4387af11804265d9d4dba7b388
Showing with 19 additions and 0 deletions.
  1. +19 −0 mythtv/libs/libmythtv/bswap.h
@@ -0,0 +1,19 @@
+#ifndef MYTHTV_BSWAP_H
+#define MYTHTV_BSWAP_H
+
+#include <stdint.h> /* uint32_t */
+#include <byteswap.h> /* bswap_16|32|64 */
+
+static __inline__ double bswap_dbl(double x)
+{
+ union {
+ uint32_t l[2];
+ double d;
+ } w, r;
+ w.d = x;
+ r.l[0] = bswap_32(w.l[1]);
+ r.l[1] = bswap_32(w.l[0]);
+ return r.d;
+}
+
+#endif /* ndef MYTHTV_BSWAP_H */

0 comments on commit 4ce4707

Please sign in to comment.