raboof / nethogs

Linux 'net top' tool
GNU General Public License v2.0
3.19k stars 289 forks source link

Fix wrong extern declaration of pidsToWatch #251

Closed sgtcortez closed 1 year ago

sgtcortez commented 1 year ago

The bug

Since pidsToWatch was declared in the main.cpp file, compilations which uses only the headers have an undefined symbol.

I have just moved the definition to the process.cpp class, which will be included in all binaries.

Checks

I am not sure how to check to reproduce the error from https://github.com/raboof/nethogs/issues/230

I have run: make & make libnethogs which compiled successfully

image

If you have another way to test the, I would be glad to learn