Fix ktorrent build on FreeBSD
ClosedPublic

Authored by alonsoschaich on Jul 20 2017, 6:31 PM.

Details

Summary

FreeBSD-11 (clang-4.0) fails to build ktorrent-master at this time, due to DHTBase being forward declared, Log macros missing, and time_t being undeclared.

I was able to resolve these issues over here by adding more #include instructions.

This patch adds all includes that were required to build on FreeBSD-11.

Test Plan

On FreeBSD-11 - using the plasma5 branch of the ports repository from here https://github.com/freebsd/freebsd-ports-kde for the dependencies - check out the ktorrent master source code and build it as usual. This will fail on the two patched files.

Diff Detail

Repository
R473 KTorrent
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
alonsoschaich created this revision.Jul 20 2017, 6:31 PM
alonsoschaich edited the summary of this revision. (Show Details)Jul 20 2017, 6:34 PM
stikonas accepted this revision.Jul 23 2017, 7:30 PM
This revision is now accepted and ready to land.Jul 23 2017, 7:30 PM

Although, you should probably use ctime instead of time.h...

This revision was automatically updated to reflect the committed changes.