qca / open-plc-utils

Qualcomm Atheros Open Powerline Toolkit.
Other
351 stars 154 forks source link

Add missing typedef for plcproperty #142

Closed mhei closed 3 years ago

mhei commented 3 years ago

Compilation with Ubuntu 20.10 uncovered the following linker problem: /usr/bin/ld: rules.o:(.bss+0x0): multiple definition of plcproperty'; pibruin.o:(.bss+0x0): first defined here /usr/bin/ld: ParseRule.o:(.bss+0x0): multiple definition ofplcproperty'; pibruin.o:(.bss+0x0): first defined here /usr/bin/ld: piblock.o:(.bss+0x0): multiple definition of plcproperty'; pibruin.o:(.bss+0x0): first defined here /usr/bin/ld: ruledump.o:(.bss+0x0): multiple definition ofplcproperty'; pibruin.o:(.bss+0x0): first defined here collect2: error: ld returned 1 exit status

When looking at the include file plc.h, we find that the typedef keyword is missing which in turn results in a variable declaration - which is usually not wanted in header files.

Signed-off-by: Michael Heimpold mhei@heimpold.de

n1000 commented 3 years ago

Hi Michael, I think this issue should be fixed by https://github.com/qca/open-plc-utils/commit/003bfe04a1e90c004506c12cba9dc61ef415726b , can you confirm?

Thanks, Nate

mhei commented 3 years ago

Hi @n1000, yep, it works. Don't know why, but somehow I missed this commit and still worked on an older commit. At least, I came to the same solution. Sorry for the noise + thanks for your hint.