How to include correct header files? <SOLVED>

I am new to Arduino and I am having the following problem with the IDE: including header files like stdio.h, inttypes.h, etc loads generic C or C++ headers in stead of the avr files.

Is there a way to have my Arduino projects load headers from the avr directory and my non-Arduino projects from the standard include directories?

I am using Arduino IDE 1.6.4 on Fedora 24 with gcc 6.1.1.

I have been looking in the preferences dialog but I don’t find any setting for include paths. The /usr/avr directory contains all necessary files but they are not found by the Arduino IDE. <

File > Preferences > Sketchbook Location

It should be top box in settings tab and have a browse button next to it to select the default file location for it to search for libraries

Alternatively, you could just copy the libraries into program files > Arduino > libraries and documents > Arduino > libraries

nunofyourbusiness: File > Preferences > Sketchbook Location

Isn't this the location for my Arduino projects?

Alternatively, you could just copy the libraries into program files > Arduino > libraries and documents > Arduino > libraries

This doesn't seem to work (I restarted Arduino IDE after copying the files).

By digging a bit deeper I found out about the platform.local.txt file where custom compiler flags can be configured.

I created the file and added the following line:

compiler.cpp.extra_flags=-isystem/usr/avr/include

Everything works fine now.