$OpenBSD: patch-src_core_bswap_h,v 1.1 2020/01/16 07:40:29 benoit Exp $
--- src/core/bswap.h.orig	Thu Apr  6 09:08:52 2017
+++ src/core/bswap.h	Thu Apr  6 09:10:15 2017
@@ -39,6 +39,7 @@
 #   include <libkern/OSByteOrder.h>
 #   define __bswap_16(x) OSSwapInt16(x)
 #   define __bswap_32(x) OSSwapInt32(x)
+#   define __bswap_64(x) OSSwapInt64(x)
 #elif HAVE_BYTESWAP_H
 #   include <byteswap.h>
 #else
@@ -48,5 +49,14 @@
 				     (((uint32_t)(x) & 0x00ff0000) >>  8) | \
 				     (((uint32_t)(x) & 0x0000ff00) <<  8) | \
                                      (((uint32_t)(x) & 0x000000ff) << 24)))
+#   define __bswap_64(x) \
+       ((uint64_t)((((uint64_t)(x) & 0xff00000000000000ULL) >> 56) | \
+                   (((uint64_t)(x) & 0x00ff000000000000ULL) >> 40) | \
+                   (((uint64_t)(x) & 0x0000ff0000000000ULL) >> 24) | \
+                   (((uint64_t)(x) & 0x000000ff00000000ULL) >>  8) | \
+                   (((uint64_t)(x) & 0x00000000ff000000ULL) <<  8) | \
+                   (((uint64_t)(x) & 0x0000000000ff0000ULL) << 24) | \
+                   (((uint64_t)(x) & 0x000000000000ff00ULL) << 40) | \
+                   (((uint64_t)(x) & 0x00000000000000ffULL) << 56)))
 #endif
 #endif
