JoachimSchurig / CppGPIO

C++14 GPIO library for embedded systems on Linux
102 stars 26 forks source link

PAGE_SIZE conflicts with header in OSX. #2

Closed bakercp closed 8 years ago

bakercp commented 8 years ago

See my little solution here:

https://github.com/bakercp/ofxCppGPIO/blob/341a812ad75ae889f3be54bcea130c79dd5d1e35/libs/CppGPIO/include/cppgpio/gpio.hpp#L46-L48

It conflicts with /usr/include/mach/i386/vm_param.h on OSX.

Not a huge deal really, but the ability to write/compile code cross platform is a really nice feature of the lib, so a tiny fix would be cool.

JoachimSchurig commented 8 years ago

Hi Chris, I changed the symbol to no more collide with the kernel. #defines are evil :) However, your other collision in i2c.cpp (symbol I2C) I will not resolve, as otherwise it would affect all existing user code. Cheers, Joachim

bakercp commented 8 years ago

Yeah, we need to change the define in openframeworks. Thanks!