mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-04 14:20:40 +02:00
clang 3.4.2-9.el7 does not like this:
$ clang -DHAVE_CONFIG_H -I. -I.. -I../src/libnm-core-public -I./src/libnm-core-public -I../src/libnm-client-public -I./src/libnm-client-public -pthread -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40 -Wall -Werror -Wextra -Wdeclaration-after-statement -Wfloat-equal -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes -Wundef -Wvla -Wno-duplicate-decl-specifier -Wno-format-y2k -Wno-missing-field-initializers -Wno-sign-compare -Wno-tautological-constant-out-of-range-compare -Wno-unknown-pragmas -Wno-unused-parameter -Qunused-arguments -Wunknown-warning-option -Wtypedef-redefinition -Warray-bounds -Wparentheses-equality -Wunused-value -Wimplicit-fallthrough -fno-strict-aliasing -fdata-sections -ffunction-sections -Wl,--gc-sections -g -O2 -MT examples/C/glib/examples_C_glib_add_connection_libnm-add-connection-libnm.o -MD -MP -MF examples/C/glib/.deps/examples_C_glib_add_connection_libnm-add-connection-libnm.Tpo -c -o examples/C/glib/examples_C_glib_add_connection_libnm-add-connection-libnm.o `test -f 'examples/C/glib/add-connection-libnm.c' || echo '../'`examples/C/glib/add-connection-libnm.c
...
../src/libnm-client-public/nm-client.h:149:31: error: redefinition of typedef 'NMClient' is a C11 feature [-Werror,-Wtypedef-redefinition]
typedef struct _NMClient NMClient;
^
Our code base is C11 internally (actually "-std=gnu11"), but this problem
happens when we build the example. The warning is actually correct, because
our public headers should be more liberal (and possibly be C99 or even C89,
this is undefined).
Fixes:
|
||
|---|---|---|
| .. | ||
| meson.build | ||
| NetworkManager.h | ||
| nm-access-point.h | ||
| nm-active-connection.h | ||
| nm-autoptr.h | ||
| nm-checkpoint.h | ||
| nm-client.h | ||
| nm-device-6lowpan.h | ||
| nm-device-adsl.h | ||
| nm-device-bond.h | ||
| nm-device-bridge.h | ||
| nm-device-bt.h | ||
| nm-device-dummy.h | ||
| nm-device-ethernet.h | ||
| nm-device-generic.h | ||
| nm-device-infiniband.h | ||
| nm-device-ip-tunnel.h | ||
| nm-device-macsec.h | ||
| nm-device-macvlan.h | ||
| nm-device-modem.h | ||
| nm-device-olpc-mesh.h | ||
| nm-device-ovs-bridge.h | ||
| nm-device-ovs-interface.h | ||
| nm-device-ovs-port.h | ||
| nm-device-ppp.h | ||
| nm-device-team.h | ||
| nm-device-tun.h | ||
| nm-device-veth.h | ||
| nm-device-vlan.h | ||
| nm-device-vrf.h | ||
| nm-device-vxlan.h | ||
| nm-device-wifi-p2p.h | ||
| nm-device-wifi.h | ||
| nm-device-wimax.h | ||
| nm-device-wireguard.h | ||
| nm-device-wpan.h | ||
| nm-device.h | ||
| nm-dhcp-config.h | ||
| nm-enum-types.c.template | ||
| nm-enum-types.h.template | ||
| nm-ethtool-utils.h | ||
| nm-ip-config.h | ||
| nm-object.h | ||
| nm-remote-connection.h | ||
| nm-secret-agent-old.h | ||
| nm-vpn-connection.h | ||
| nm-vpn-editor.h | ||
| nm-vpn-plugin-old.h | ||
| nm-vpn-service-plugin.h | ||
| nm-wifi-p2p-peer.h | ||
| nm-wimax-nsp.h | ||
| README.md | ||
libnm-client-public
libnm is NetworkManager's client API. It has a public API. This API consists of two parts:
- the handling of connections (
NMConnection), implemented by libnm-core-impl. - the caching of D-Bus API (
NMClient), implemented by libnm-client-impl.
This directory contains public headers that are used by libnm
users. As such, it's the NMClient part of libnm-core-public.
These headers are usable to any libnm client application and to libnm itself. But not to libnm-core-impl or the daemon.