open serial port (doesn't compile)

I’m trying to open the serial port with this code:

#include
int handle = open(“/com/1”, O_WRONLY);

But it doesn’t compile:
…/root.cxx:270: error: O_WRONLY' undeclared (first use this function) ../root.cxx:270: error: open’ undeclared (first use this function)

I also tried to include ind_io.h (since that file has “#define O_WRONLY 0x1” in it) but this still doesn’t work.

What am I doing wrong?

#include
#include

Thanks, it works.
Is this documented somewhere?