Trying to use fileio and sd at the same time on arduino yun

Hi folks
I’m trying to copy a file from the AR9331 of an arduino yun to a SD-card that is connected to the 32u4-side of the arduino yun. I’m trying to do this using Fileio.h und SD.h using the following sketch:

  Trying to copy a file from Yun's AR9331-SD to 32U4-SD
  over FileIO (Bridge).


#include <SPI.h>
#include <SD.h>
#include <Bridge.h>
#include <FileIO.h>

// TFT display and SD card will share the hardware SPI interface.
// Hardware SPI pins are specific to the Arduino board type and
// cannot be remapped to alternate pins.

#define SD_CS 4

File myFile;

void setup(void) {
  Bridge.begin(); // Noetig, damit die Console laeuft, man also ueber Internet etwas vom Arduino yun hoeren kann
  pinMode(8, OUTPUT); // Hardware SS must be set to Output!

  Serial.print("Initializing SD card...");
  if (!SD.begin(SD_CS)) {

  if (SD.exists("test.bmp")) {
	Serial.println("Removing example.txt...");

  myFile ="test.bmp", FILE_WRITE);
  if (myFile){
  // Open requested file on SD card of AR9331
  File bmpFile ="/mnt/sda1/bilder/75er/001.bmp");
  if (bmpFile == NULL) {
    Serial.println("File not found");
  else {
    Serial.println("File found");
  // Jetzt lesen wir die Daten via Bridge und schreiben Sie ins File.
  while (bmpFile.available()){

void loop() {

However - there is always a compile-error.

In file included from copy_bmp_from_ar9331_to_32u4_sd.ino:10:0:
/Applications/ error: redefinition of ‘class File’
class File : public Stream {
In file included from copy_bmp_from_ar9331_to_32u4_sd.ino:8:0:
/Applications/ error: previous definition of ‘class File’
class File : public Stream {

Has anyone tried this before and found a solution to be able to copy files anyway? Maybe rewrite one of the Libraries to rename the class?
Thank you for a suggestion, Dani