Thanks! Yeah those changes are sensible, I wasn't sure what header file to use, and the printf is left over from debugging.
I guess my next question is, can anyone update the old Windows build zip at
https://osmocom.org/attachments/2242 as software like SDR# pulls rtlsdr.dll from that via a bat file? I guess they should really pull from the weekly builds, but that probably complicates the bat file a little since it needs to track the latest build date and rename librtlsdr.dll to rtlsdr.dll.
And secondly, how often does the rtl-sdr apt-get package on Linux get updated, and who would need to be informed for that to happen?