Use linux glibc headers on OSX

I’m writing my output module for rsyslog on OSX, the IDE I choose is AppCode.

To import the folder, I created an empty project, added the whole source folder cloned from github, added following paths into ‘Header Search Paths‘(use HSP for short):

No Recursive checked.

As you can see, I have macports installed, and the json-c is installed from there.

Rsyslog also requires libestr from libestr.adiscon.com, I downloaded a copy and extracted, then added another line to the HSP:

After these, I can make most reference work, but the integer definitions on OSX are different from linux.
The solution is:
1 Install following packages:

2 Add these lines to HSP:

3 Remove these lines from HSP:

Use linux glibc headers on OSX by @sskaje: https://sskaje.me/2014/08/linux-glibc-headers-osx/

Incoming search terms: