aboutsummaryrefslogtreecommitdiffstats
path: root/src/fnetlock
Commit message (Collapse)AuthorAge
* build: use full paths on compile/link targetsLibravatar Kelvin M. Klann2024-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the compile commands clearer when building in parallel (with `make -j`) and ensures that `__FILE__` includes the full build-time path (relative to the root of the repository) whenever it is referenced, such as in failed assert() messages (currently the full path is only shown in errExit() messages). Example: Before: firejail: main.c:100: main: Assertion `1 == 2' failed. Error src/firecfg/main.c:100: main: malloc: Cannot allocate memory After: firejail: ../../src/firejail/main.c:100: main: Assertion `1 == 2' failed. Error ../../src/firecfg/main.c:100: main: malloc: Cannot allocate memory Commands used to search and replace: $ git grep -Ilz '^MOD_DIR =' -- '*Makefile' | xargs -0 -I '{}' \ sh -c "printf '%s\n' \"\$(sed -E \ -e 's|^MOD_DIR = src/(.*)|MOD = \\1\\nMOD_DIR = \$(ROOT)/src/\$(MOD)|' \ -e 's:^(PROG|SO) = [^.]+(\.so)?$:\\1 = \$(MOD_DIR)/\$(MOD)\2:' \ '{}')\" >'{}'" $ git grep -Ilz '^HDRS :=' -- '*.mk' | xargs -0 -I '{}' \ sh -c "printf '%s\n' \"\$(sed -E \ -e 's|wildcard (\*\..)|wildcard \$(MOD_DIR)/\\1|' '{}')\" >'{}'" Note: config.mk.in, src/fnettrace/Makefile and src/include/common.h were edited manually. This is a follow-up to #5871.
* update copyright 2024Libravatar netblue302024-01-12
|
* fnetlock: fix unused bw variable warningLibravatar Kelvin M. Klann2023-07-27
| | | | | | | | | | | | | | | | | | | | | This is breaking build-clang on CI[1]: make -C src/fnetlock/ make[1]: Entering directory '/home/runner/work/firejail/firejail/src/fnetlock' clang-14 [...] -c main.c -o main.o main.c:97:11: error: variable 'bw' set but not used [-Werror,-Wunused-but-set-variable] unsigned bw = 0; // bandwidth calculations ^ 1 error generated. make[1]: *** [../../src/prog.mk:16: main.o] Error 1 make: *** [Makefile:58: src/fnetlock/fnetlock] Error 2 Added on commit 8e4b847cd ("split nettrace executable ^Cto netrace and netlock", 2023-07-25). [1]: https://github.com/netblue30/firejail/actions/runs/5669072674/job/15361026508 Cc: @netblue30
* split nettrace executable ^Cto netrace and netlockLibravatar netblue302023-07-25