Files
third_party_libnl/include/netlink-private/utils.h
T
Davide Caratti a355b9a53b remove multiple implementations of htonll(), ntohll()
use a single #define in include/netlink-private/utils.h

Signed-off-by: Davide Caratti <davide.caratti@gmail.com>
2016-09-06 11:21:48 +02:00

26 lines
630 B
C

/*
* netlink-private/utils.h Local Utility Functions
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* Copyright (c) 2003-2012 Thomas Graf <tgraf@suug.ch>
*/
#ifndef NETLINK_UTILS_PRIV_H_
#define NETLINK_UTILS_PRIV_H_
#include <byteswap.h>
#if __BYTE_ORDER == __BIG_ENDIAN
#define ntohll(x) (x)
#elif __BYTE_ORDER == __LITTLE_ENDIAN
#define ntohll(x) bswap_64((x))
#endif
#define htonll(x) ntohll(x)
extern const char * nl_strerror_l(int err);
#endif