mirror of
https://github.com/openharmony/third_party_libnl.git
synced 2026-07-21 16:05:23 -04:00
a355b9a53b
use a single #define in include/netlink-private/utils.h Signed-off-by: Davide Caratti <davide.caratti@gmail.com>
26 lines
630 B
C
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
|