[Solved] MIT cheetah make error: ‘ioctl’ was not declared in this scope

Question:

error: ‘ioctl’ was not declared in this scope
   35 |   ioctl(fd, TCGETS2, &tty);

Solution:
Open Cheetah-Software-master/robot/src/rt/rt_serial.cpp
Change

#define termios asmtermios

#include <asm/termios.h>

#undef termios

#include <termios.h>
#include <math.h>
#include <pthread.h>
#include <stropts.h>
#include <endian.h>
#include <stdint.h>

to

#define termios asmtermios

//#include <asm/termios.h>
#include<asm/ioctls.h>
#include<asm/termbits.h>

#undef termios

#include<sys/ioctl.h>
#include <termios.h>
#include <math.h>
#include <pthread.h>
#include <stropts.h>
#include <endian.h>
#include <stdint.h>

Read More: