Skip to content

Commit

Permalink
Fix PPC compilation of NuppeDecoder and NuppelRecorder
Browse files Browse the repository at this point in the history
Patch from Lawrence Rust.
(cherry picked from commit 933475e)
  • Loading branch information
Mark Kendall committed Feb 21, 2011
1 parent c66dceb commit 4ce4707
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions 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.