diff options
author | João Valverde <j@v6e.pt> | 2023-01-31 20:14:26 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2023-02-06 15:04:46 +0000 |
commit | d70e174ca065a1adbc126cedc60165123f7151eb (patch) | |
tree | f26faf557143fa4a32a77639b8962c8d03b5210c /wsutil | |
parent | b07ab25a1c1293d72e71ecd728386ea9ed9658df (diff) |
Remove wsutil/netlink.h workaround
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/CMakeLists.txt | 1 | ||||
-rw-r--r-- | wsutil/netlink.h | 65 |
2 files changed, 0 insertions, 66 deletions
diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt index bfa69a5965..bdc1f0f9eb 100644 --- a/wsutil/CMakeLists.txt +++ b/wsutil/CMakeLists.txt @@ -60,7 +60,6 @@ set(WSUTIL_PUBLIC_HEADERS jsmn.h json_dumper.h mpeg-audio.h - netlink.h nstime.h os_version_info.h pint.h diff --git a/wsutil/netlink.h b/wsutil/netlink.h deleted file mode 100644 index f39c2988b5..0000000000 --- a/wsutil/netlink.h +++ /dev/null @@ -1,65 +0,0 @@ -/** @file - * - * netlink-related definitions shared between libwireshark and other parts - * - * Copyright 2018, Martin Kaiser - * - * Wireshark - Network traffic analyzer - * By Gerald Combs <gerald@wireshark.org> - * Copyright 1998 Gerald Combs - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -#ifndef _WS_NETLINK_H -#define _WS_NETLINK_H - -#if defined(HAVE_LIBNL) - -/* - * Pull in the include files where the kernel's nla_for_each_nested is defined. - * This is to make sure that the kernel's definition will not overwrite our - * version if msg.h or attr.h are included again explicitly after this file. - */ -DIAG_OFF_PEDANTIC -#include <netlink/msg.h> -DIAG_ON_PEDANTIC -#include <netlink/attr.h> - -/* - * And now for a steaming heap of suck. - * - * The nla_for_each_nested() macro defined by at least some versions of the - * Linux kernel's headers doesn't do the casting required when compiling - * with a C++ compiler or with -Wc++-compat, so we get warnings, and those - * warnings are fatal when we compile this file. - * - * So we replace it with our own version, which does the requisite cast. - */ - -/** - * nla_for_each_nested - iterate over nested attributes - * @pos: loop counter, set to current attribute - * @nla: attribute containing the nested attributes - * @rem: initialized to len, holds bytes currently remaining in stream - */ -#undef nla_for_each_nested -#define nla_for_each_nested(pos, nla, rem) \ - nla_for_each_attr(pos, (struct nlattr *)nla_data(nla), nla_len(nla), rem) - -#endif /* HAVE_LIBNL */ - -#endif /* _WS_NETLINK_H */ - -/* - * Editor modelines - https://www.wireshark.org/tools/modelines.html - * - * Local variables: - * c-basic-offset: 4 - * tab-width: 8 - * indent-tabs-mode: nil - * End: - * - * vi: set shiftwidth=4 tabstop=8 expandtab: - * :indentSize=4:tabSize=8:noTabs=true: - */ |