enable test_memusage only if OS_LINUX is defined
orcl-jlana opened this issue · comments
Description of Problem:
The tests test_memusage.c uses read_common_sizet(...), but the method is available only if OS_LINUX is defined Otherwise the compilation of the test fails.
OpenSCAP Version: actual
Operating System & Version: reproduced on Solaris, but IMHO affects all non-linux OSes
Steps to Reproduce: cmake && make
Actual Results:
...
[ 84%] Linking C executable test_memusage
ld: warning: file /usr/lib/amd64/libexslt.so: attempted multiple inclusion of file
ld: warning: file /usr/lib/64/libpcre.so: attempted multiple inclusion of file
ld: warning: file /usr/lib/64/libcurl.so: attempted multiple inclusion of file
Undefined first referenced
symbol in file
read_common_sizet CMakeFiles/test_memusage.dir/test_memusage.c.o
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
*** Error code 1
Actually this should be fixed in a different way, by adding if defined (OS_SOLARIS)
to the internal implementation of the function. See: #1941.
Sorry for the noise.
Hey! Does #1941 fix the problem?