Sketch compiles on Windows, not on RPi

A sketch I've been using for some while, with variations, compiles fine on Windows. I've just tried to compile it on RPi and the compiler doesn't like the declared class being a parameter type for a function. I've reduced it to a small example. I'm assuming my code is fully legal C++ and the compilers are the same. Please let me know if not, or you know a workaround. IDEs are 1.8.7 and 2:1.0.5+dfsg2-4.1

This compiles on Windows but on RPi:

class c1
{
public:
char ch[2];
};

boolean f1(c1 data[]){return false;}

void setup() {}
void loop() {}

Compiler_Test3.ino:4:12: error: ‘c1’ was not declared in this scope
Compiler_Test3.ino: In function ‘boolean f1(c1*)’:
Compiler_Test3.ino:11:21: error: ‘boolean f1(c1*)’ redeclared as different kind of symbol
Compiler_Test3.ino:4:9: note: previous declaration ‘boolean f1’

(I guess the first error is the only one that matters, the others go away when that is fixed.)

When you install the Arduino IDE via apt-get, you end up with an extremely outdated version of the IDE. The bug you're encountering was likely fixed years ago. Please always install the latest version of the official Arduino IDE downloaded from:

In case you're curious why the package manager version is so outdated:

@pert

Yes I did use apt-get. Thanks for quick reply.

Richard.