using non standard baudrate in Linux

I want to use a non standard baudrate in Linux. With termios.h you cant set the baudrate outside standard baudrates. What can i do? (C++)

You should be able to use the “cspeed” setting for custom baud rates in Linux.