cURL / Mailing Lists / curl-library / Single Mail

curl-library

sys_nerr warning

From: Joe Halpin <j.p.h_at_comcast.net>
Date: Sat, 03 Apr 2004 11:09:51 -0600

This patch elminates the warning about sys_nerr on FreeBSD:

../../curl/lib/strerror.c:489: warning: type qualifiers for `sys_nerr'
conflict with previous decl

Index: lib/strerror.c
===================================================================
RCS file: /repository/curl/lib/strerror.c,v
retrieving revision 1.4
diff -r1.4 strerror.c
489c489
< extern int sys_nerr;

---
 > extern const int sys_nerr;
I'm pretty sure it should be const anyway. This doesn't cause any 
problems on Solaris 9 either. However the Solaris errno.h has the 
following comment which might be something to think about.
#if defined(_LP64)
/*
  * The symbols _sys_errlist and _sys_nerr are not visible in the
  * LP64 libc.  Use strerror(3C) instead.
  */
#endif /* _LP64 */
Received on 2004-04-03