Pppos library on ESP8266

I am trying to compile a firmware with PPPOS on ESP8266. It gives following error: How to fix this?

  CC    /home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:483:44: error: 'struct tcpip_api_call_data' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
  483 | static err_t pppapi_do_ppp_set_auth(struct tcpip_api_call_data *m) {
      |                                            ^~~~~~~~~~~~~~~~~~~
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c: In function 'pppapi_do_ppp_set_auth':
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:486:38: error: dereferencing pointer to incomplete type 'struct pppapi_msg'
  486 |       (struct ppp_set_auth_arg *) msg->msg.msg.ioctl.arg;
      |                                      ^~
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c: In function 'pppos_set_auth':
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:498:10: error: variable 'msg' has initializer but incomplete type
  498 |   struct pppapi_msg msg = {
      |          ^~~~~~~~~~
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:499:8: error: 'struct pppapi_msg' has no member named 'msg'
  499 |       .msg.ppp = pcb,
      |        ^~~
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:499:18: error: excess elements in struct initializer [-Werror]
  499 |       .msg.ppp = pcb,
      |                  ^~~
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:499:18: note: (near initialization for 'msg')
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:500:8: error: 'struct pppapi_msg' has no member named 'msg'
  500 |       .msg.msg.ioctl.arg = &auth_arg,
      |        ^~~
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:500:28: error: excess elements in struct initializer [-Werror]
  500 |       .msg.msg.ioctl.arg = &auth_arg,
      |                            ^
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:500:28: note: (near initialization for 'msg')
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:498:21: error: storage size of 'msg' isn't known
  498 |   struct pppapi_msg msg = {
      |                     ^~~
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:502:3: error: implicit declaration of function 'tcpip_api_call' [-Werror=implicit-function-declaration]
  502 |   tcpip_api_call(pppapi_do_ppp_set_auth, &msg.call);
      |   ^~~~~~~~~~~~~~
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:498:21: error: unused variable 'msg' [-Werror=unused-variable]
  498 |   struct pppapi_msg msg = {
      |                     ^~~
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c: In function 'mgos_pppos_dispatch_once':
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:634:11: error: implicit declaration of function 'pppos_input_tcpip'; did you mean 'pppos_input'? [-Werror=implicit-function-declaration]
  634 |           pppos_input_tcpip(pd->pppcb, (u8_t *) pd->data.buf, pd->data.len);
      |           ^~~~~~~~~~~~~~~~~
      |           pppos_input
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:814:19: error: implicit declaration of function 'pppapi_pppos_create'; did you mean 'mgos_pppos_create'? [-Werror=implicit-function-declaration]
  814 |       pd->pppcb = pppapi_pppos_create(&pd->pppif, mgos_pppos_send_cb,
      |                   ^~~~~~~~~~~~~~~~~~~
      |                   mgos_pppos_create
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:814:17: error: assignment to 'ppp_pcb *' {aka 'struct ppp_pcb_s *'} from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
  814 |       pd->pppcb = pppapi_pppos_create(&pd->pppif, mgos_pppos_send_cb,
      |                 ^
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:826:19: error: implicit declaration of function 'pppapi_connect'; did you mean 'ppp_connect'? [-Werror=implicit-function-declaration]
  826 |       err_t err = pppapi_connect(pd->pppcb, 0 /* holdoff */);
      |                   ^~~~~~~~~~~~~~
      |                   ppp_connect
In file included from /home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:20:
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:828:24: error: format '%d' expects argument of type 'int', but argument 2 has type 'err_t' {aka 'long int'} [-Werror=format=]
  828 |         LOG(LL_ERROR, ("pppapi_connect failed: %d", err));
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~
      |                                                     |
      |                                                     err_t {aka long int}
/mongoose-os/include/common/cs_dbg.h:114:21: note: in definition of macro 'LOG'
  114 |       cs_log_printf x;                                \
      |                     ^
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:828:49: note: format string is defined here
  828 |         LOG(LL_ERROR, ("pppapi_connect failed: %d", err));
      |                                                ~^
      |                                                 |
      |                                                 int
      |                                                %ld
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:829:9: error: implicit declaration of function 'pppapi_free'; did you mean 'ppp_free'? [-Werror=implicit-function-declaration]
  829 |         pppapi_free(pd->pppcb);
      |         ^~~~~~~~~~~
      |         ppp_free
/home/aashish/MOS/empty/deps/pppos/src/mgos_pppos.c:853:11: error: implicit declaration of function 'pppapi_close'; did you mean 'ppp_close'? [-Werror=implicit-function-declaration]
  853 |           pppapi_close(pppcb, 1 /* no_carrier */);
      |           ^~~~~~~~~~~~
      |           ppp_close
cc1: all warnings being treated as errors