Line 0
Link Here
|
|
|
1 |
--- src/curl.c.orig 2019-06-19 09:02:26 UTC |
2 |
+++ src/curl.c |
3 |
@@ -24,6 +24,8 @@ |
4 |
#define BSWAP_32 OSSwapInt32 |
5 |
#elif (defined(__OpenBSD__)) |
6 |
#define BSWAP_32(x) swap32(x) |
7 |
+#elif (defined(__FreeBSD__)) |
8 |
+#include <sys/endian.h> |
9 |
#elif (defined(__GLIBC__)) |
10 |
#include <byteswap.h> |
11 |
#define BSWAP_32(x) bswap_32(x) |
12 |
@@ -146,7 +148,7 @@ static size_t rcurl_read(void *target, size_t sz, size |
13 |
static int rcurl_fgetc(Rconnection con) { |
14 |
int x = 0; |
15 |
#ifdef WORDS_BIGENDIAN |
16 |
- return rcurl_read(&x, 1, 1, con) ? BSWAP_32(x) : R_EOF; |
17 |
+ return rcurl_read(&x, 1, 1, con) ? bswap32(x) : R_EOF; |
18 |
#else |
19 |
return rcurl_read(&x, 1, 1, con) ? x : R_EOF; |
20 |
#endif |