Closed dstipp closed 9 years ago
Hey, thanks for looking at this. I'll need some way to build for OSX for testing (at least to check that it compiles after I make changes). It looks like travis-ci will support OSX, do you have any experience with that?
For the rtlsdr_dev_t thing, we can either compile with whatever flag enables C11 support, or make it a void* in the struct and cast where needed.
For the missing clock_nanosleep, you could build something equivalent from gettimeofday() or clock_gettime() and nanosleep()
Appreciate the comments. I wanted to get this over despite not being finished before I spent too much time on it.
I've not yet looked at travis-ci, but it should be straightforward. It may get a little mouse-trappy for the first build of this. I'll probably have to do a separate CR to add in OS X CI support.
As for the rest, I'll take a look later tonight. I'm not too familiar with CLANG other than "It's very strict." Honestly surprised it let me get away with the stub shenanigans looking back at them this in the morning. :-)
Ok, looks like I now have a working build on OS X 10.10, Debian Jessie, and Ubuntu (through travis.) I have to enable c11 in llvm/clang, but doing the same on gcc causes an implosion...
Would be interested in further feedback on how to clean up the compat inclusions.
I'll start looking at travisci builds for OS X in another PR. It's probably going to be annoying since I may very well have to build librtlsdr & libusb before attempting a build of dump1090.
Well, that was easy. Included a patch to update travis to do multi-platform builds. Valid on both Linux & OS X.
I did a few rearrangements and merged this. The travis build seems happy, can you check it works OK for you?
Looking good here, thanks.
Was: First pass at Darwin/Mach/Apple portability