summaryrefslogtreecommitdiff
path: root/devel/libyang/patches/patch-compat_compat.h.in
blob: 7c029450420ecba414296aa1db710d1bfd1faf68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$NetBSD: patch-compat_compat.h.in,v 1.1 2020/12/10 16:25:19 kardel Exp $

	NetBSD already defines bswap64.

--- compat/compat.h.in.orig	2020-10-10 06:19:45.124141482 +0000
+++ compat/compat.h.in
@@ -44,6 +44,7 @@
 #cmakedefine HAVE_GETLINE
 #cmakedefine HAVE_GET_CURRENT_DIR_NAME
 
+#ifndef __NetBSD__
 #define bswap64(val) \
     ( (((val) >> 56) & 0x00000000000000FF) | (((val) >> 40) & 0x000000000000FF00) | \
     (((val) >> 24) & 0x0000000000FF0000) | (((val) >>  8) & 0x00000000FF000000) | \
@@ -62,6 +63,7 @@
 # define le64toh(x) (x)
 # define htole64(x) (x)
 #endif
+#endif
 
 #ifndef MAP_ANONYMOUS
 #define MAP_ANONYMOUS MAP_ANON