Refer to https://github.com/raspberrypi/linux/issues/6037,

You can change it with other gpio liberary such as gpiod.

We just provide the sample code, so if you are new to this, ignore it.