libubox: remove submodule
Including the libubox repository as a module isn't needed.
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
omcproxy: update cmake file
Now that the minimum cmake version has been bumped, the cmake file can
be modernized a bit. Although it might look like a lot of changes, most of them
are quite straightforward.
Every library is located in a consistent manner (allowing command-line
overrides of library locations, useful for local development, and also makes it
trivial to do static linking, if desired).
The compiler flags have been broken up to have one per line (making it easy in
the future to add/remove flags, which would create a simple one-line diff).
Although it might look like this bumps the C standard level, cmake is actually
smart enough to pick an earlier version if C11 isn't supported by the compiler
(quite unlikely on any versions of gcc currently in use in OpenWrt and even on
old distros).
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
proxy: fix indentation warning
Fixes the following warning caused by a bad indentation:
src/proxy.c: In function ‘proxy_set’:
src/proxy.c:161:17: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
161 | for (i = 0; i < downlinks_cnt && downlinks[i] == iface->iface->ifindex; ++i);
| ^~~
src/proxy.c:162:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
162 | if (i == downlinks_cnt)
| ^~
Signed-off-by: Vladimír Chlup <[email protected]>
Link: https://github.com/openwrt/omcproxy/pull/13
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
build: require CMake >= 3.10 due to dropped legacy support
CMake version 4.0 and later require minimum version of 3.5 or later.
Update to minimum version 3.10 which is the last not deprecated minimum
version.
CMake 3.10 was released in November 2017 and is included in Ubuntu 18.04.
Signed-off-by: Hauke Mehrtens <[email protected]>
Update libubox
Commit
bfba2aa75802ff1a70ef2fd3eba53409a8c6e93a adds a call to
uloop_timeout_remaining64, but the submodule is still on a version from
2015 that doesn't have that function.
Update to libubox master as the changes between Nov 2021 and today don't
look scary.
Fix null pointer access in proxy_set
We were checking `proxy->ifindex`, but `proxy` is initialized to NULL. Should be checking `p->ifindex` instead.
Signed-off-by: Andrew Rodland <[email protected]>
groups: use uloop_timeout_remaining64
The uloop_timeout_remaining function is being deprecated.
Signed-off-by: Stijn Tintel <[email protected]>
Acked-by: Jo-Philipp Wich <[email protected]>
mrib.c: don't use cpu_to_be32 outside of function
cpu_to_be32 is not a constant, so it can't be used outside of a
function.
Signed-off-by: Eneas U de Queiroz <[email protected]>
Cmake: Find libubox/list.h
Add a CMake FIND_PATH and INCLUDE_DIRECTORIES searching for
libubox/list.h. Some external toolchains which do not include
standard locations would fail to find the header otherwise.
Signed-off-by: Florian Fainelli <[email protected]>