OpenVAS Scanner 23.23.1
support.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Greenbone AG
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later
4 */
5
10
11#ifndef MISC_SUPPORT_H
12#define MISC_SUPPORT_H
13
14// This structure does not exist on MacOS or FreeBSD systems
15#ifndef s6_addr32
16#if defined(__APPLE__) || defined(__FreeBSD__)
17#define s6_addr32 __u6_addr.__u6_addr32
18#endif // __APPLE__ || __FreeBSD__
19#endif // !s6_addr32
20
21// Add backward compatibility for systems with older glib version
22// which still support g_memdup
23#include <glib.h>
24// TODO: Remove once our reference system supports g_memdup2
25#if GLIB_MAJOR_VERSION >= 2 && GLIB_MINOR_VERSION < 68
26#define g_memdup2 g_memdup
27#endif
28// TODO: Remove once our reference system supports g_pattern_spec_match_string
29#if GLIB_MAJOR_VERSION >= 2 && GLIB_MINOR_VERSION < 70
30#define g_pattern_spec_match_string g_pattern_match_string
31#endif
32
33#endif /* not MISC_SUPPORT_H */