aboutsummaryrefslogtreecommitdiff
path: root/emulators/mupen64plus-video-glide64mk2/files/patch-src_Glide64_Util.h
blob: 30529e17c6f782a20b3db2957c9621849148a11c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- src/Glide64/Util.h.orig	2024-01-06 03:12:23 UTC
+++ src/Glide64/Util.h
@@ -94,6 +94,9 @@ float ScaleZ(float z);
   #include <stdlib.h>
   #define bswap32(x) _byteswap_ulong(x)
 #else
+#if defined __FreeBSD__
+#include <sys/endian.h>
+#else
 static inline uint32_t bswap32(uint32_t val)
 {
 	return (((val & 0xff000000) >> 24) |
@@ -101,6 +104,7 @@ static inline uint32_t bswap32(uint32_t val)
 		((val & 0x0000ff00) <<  8) |
 		((val & 0x000000ff) << 24));
 }
+#endif
 #endif
 
 #define ALOWORD(x)   (*((uint16_t*)&(x)))   // low word