2 * ALSA lib - compatibility header for providing byte swapping macros
3 * Copyright (c) 2016 by Thomas Klausner <wiz@NetBSD.org>
6 * This library is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation; either version 2.1 of
9 * the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
26 #include <sys/endian.h>
27 #define bswap_16 bswap16
28 #define bswap_32 bswap32
29 #define bswap_64 bswap64
31 #include <sys/byteorder.h>
32 #define bswap_16 BSWAP_16
33 #define bswap_32 BSWAP_32
34 #define bswap_64 BSWAP_64