summaryrefslogtreecommitdiff
path: root/pgsql.c
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-04-21 12:26:43 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-04-21 12:26:43 +0200
commit027a3397114c349cf2c2e68fed7545345cd20849 (patch)
treebaf56a3974a6e1fb555733ab5f9b5e1ce0a1683a /pgsql.c
parent97b1e374c5df2c77862f83c33620bc6541ed250f (diff)
downloadpgfuse-027a3397114c349cf2c2e68fed7545345cd20849.tar.gz
pgfuse-027a3397114c349cf2c2e68fed7545345cd20849.tar.bz2
fixed for RHEL5
Diffstat (limited to 'pgsql.c')
-rw-r--r--pgsql.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/pgsql.c b/pgsql.c
index 6b83dd0..fc8b154 100644
--- a/pgsql.c
+++ b/pgsql.c
@@ -25,25 +25,7 @@
#include <arpa/inet.h> /* for htonl, ntohl */
#include <stdint.h> /* for uint64_t */
-/* for be64toh and htobe64 */
-#if defined(__linux__)
-#include <endian.h>
-#ifndef be64toh
-#include <byteswap.h>
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define htobe64( x ) bswap_64 ( x )
-#define be64toh( x ) bswap_64( x )
-#else
-#define htobe64( x ) ( x )
-#define be64toh( x ) ( x )
-#endif
-#endif
-#elif defined(__FreeBSD__) || defined(__NetBSD__)
-#include <sys/endian.h>
-#elif defined(__OpenBSD__)
-#include <sys/types.h>
-#define be64toh( x ) betoh64(x)
-#endif
+#include "endian.h" /* for be64toh and htobe64 */
#include "config.h" /* compiled in defaults */