[Solved] Arduino ATmega8535 compile errors. Something wrong with delay.h?

Hi!
I’ve successfully ported the latest version of Optiboot to the ATmega8535.
Everything seems fine, but when I try to upload the bareMinimum sketch, i get this error (from verbose output):

/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega8535 -DF_CPU={build.f_cpu} -DARDUINO=10605 -DARDUINO_AVR_ATmega8535 -DARDUINO_ARCH_AVR -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Users/hansi/Documents/Arduino/hardware/DIP-40/avr/variants/standard8535 /var/folders/dq/hx2349v96976k43y7m27s05m0000gn/T/build1290833406446952509.tmp/BareMinimum.cpp -o /var/folders/dq/hx2349v96976k43y7m27s05m0000gn/T/build1290833406446952509.tmp/BareMinimum.cpp.o 
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h: In function 'void _delay_ms(double)':
<command-line>:0:8: error: 'build' was not declared in this scope
<command-line>:0:19: error: expected ';' before '}' token
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h: In function 'void _delay_us(double)':
<command-line>:0:8: error: 'build' was not declared in this scope
<command-line>:0:19: error: expected ';' before '}' token
Error compiling.

There seems to be a problem with the delay.h header. This does support the ATmega8535, doesn’t it?
How can this error be solved?

Oh, here is my boards.txt cutout:

8535.name=ATmega8535
8535.upload.tool=avrdude
8535.upload.protocol=arduino
8535.upload.maximum_size=7680
8535.upload.maximum_data_size=512

8535.bootloader.tool=avrdudeCustom
8535.bootloader.unlock_bits=0x3f
8535.bootloader.lock_bits=0x0f

8535.build.mcu=atmega8535
8535.build.core=modified_16_164_32_324
8535.build.board=AVR_ATmega8535
8535.build.variant=standard8535

#make atmega8535 AVR_FREQ=16000000L BAUD_RATE=115200 UART=0 LED=B0 LED_START_FLASHES=2
8535.menu.clock.16MHz_external=16MHz external (BOD 2.7v)
8535.menu.clock.16MHz_external.upload.speed=115200
8535.menu.clock.16MHz_external.bootloader.low_fuses=0xbf
8535.menu.clock.16MHz_external.bootloader.high_fuses=0xdc
8535.menu.clock.16MHz_external.bootloader.file=optiboot/atmega8535/optiboot_atmega8535_16MHz.hex
.menu.clock.16MHz_external.build.f_cpu=16000000L

AAH!! Stupid me! Missed "8535" in front of ".menu.clock.16MHz_external.build.f_cpu=16000000L" :stuck_out_tongue: Problem solved :wink: