exploit – Metasploit – for’ loop initial declarations are only allowed in C99

I am addressing a C compile error with a Metasploit exploit called: “linux/local/sudo_baron_samedit”. In particular, I have defined all necessary parameters as shown below:

Module options (exploit/linux/local/sudo_baron_samedit):

   Name         Current Setting  Required  Description
   ----         ---------------  --------  -----------
   SESSION      1                yes       The session to run this module on.
   WritableDir  /tmp             yes       A directory where you can write files.


Payload options (linux/x64/meterpreter/reverse_tcp):

   Name   Current Setting  Required  Description
   ----   ---------------  --------  -----------
   LHOST  XXXX             yes       The listen address (an interface may be specified)
   LPORT  4444             yes       The listen port


Exploit target:

   Id  Name
   --  ----
   4   Debian 10 x64 (sudo v1.8.27, libc v2.28)

Please note that LHOST is not given for privacy reasons. However, it has been defined properly. Unfortunately, I am getting the following error:

(*) Executing automatic check (disable AutoCheck to override)
(+) The target appears to be vulnerable. sudo 1.8.23 is a vulnerable build.
(-) /tmp/1ghC2.c: In function ‘exploit’:
/tmp/1ghC2.c:80:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for(int i = 0; i < target->null_stomp_len; i++) {
     ^
/tmp/1ghC2.c:80:5: note: use option -std=c99 or -std=gnu99 to compile your code
(-) Exploit aborted due to failure: bad-config: /tmp/1ghC2.c failed to compile.
(*) Exploit completed, but no session was created.

Any idea, please? Thanks in advance.