« How to display the current playing music/song in MSN Messenger using Winamp | Main | Linux lacking applications makes desktop use a hell »

Qpopper 4.0.8 warning: sys_errlist is deprecated; use strerror' or strerror_r instead

I was compiling Qpopper 4.0.8, and when I did a make, I got the following error (quitting the make):

main.o(.text+0x1346): In function `sys_err_str': /packages/qpopper4.0.8/popper/main.c:875: warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead main.o(.text+0x1307):/packages/qpopper4.0.8/popper/main.c:874: warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead make[1]: Leaving directory `/packages/qpopper4.0.8/popper'

Well, turns out that I solved the problem myself, correcting the code.
sys_nerr and sys_errlist are deprecated, and I created a solution.

If you have another program that displays the same message, the solution may work too. Here is:

Go to qpopper source main directory, then goto the popper subdirectory.

There is a file named main.c, this is the file that we will make the changes.

Open main.c and replace the following lines:

ORIGINAL Line 874: if ( errno > 0 && errno < sys_nerr )
NEW Line 874: if ( errno > 0 )

ORIGINAL Line 876: errno, sys_errlist [ errno ] );
NEW Line 876: errno, syserror(errno) );

Now it will compile without errors.

As pointed before, you can try this solution on other software that may be having similar errors, because sys_nerr and sys_errlist are still being used wrongly by some codes.

If you want, you can download the modified main.c here