misc/103470: __evOptMonoTime is inconsistently declared in lib/libc/isc

Diego Pettenò flameeyes at gentoo.org
Thu Sep 21 18:10:30 PDT 2006

>Number:         103470
>Category:       misc
>Synopsis:       __evOptMonoTime is inconsistently declared in lib/libc/isc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 22 01:10:17 GMT 2006
>Originator:     Diego Pettenò
>Release:        6.2-BETA1
FreeBSD defiant 6.2-BETA1 FreeBSD Gentoo 6.2_beta1 #1: Thu Sep 21 23:24:32 CEST 2006     root at defiant:/usr/src/sys-6.2_beta1/i386/compile/GENERIC  i386

Although I know that this is totally non-priority for FreeBSD developers, I'd like to report that the variable __evOptMonoTime is declared inconsistently in lib/libc/isc from the sources of the just released 6.2-BETA1 FreeBSD:

lib/libc/isc/eventlib_p.h:283:extern int        __evOptMonoTime;
lib/libc/isc/ev_timers.c:53:static int  __evOptMonoTime;

This leads to a failure in build with GCC 4.1, and it really makes no sense, so that the behaviour is really undefined even on other GCC versions.
As __evOptMonoTime seems to be an exported symbol to set global options, the static keyword should be dropped from ev_timers.c.

Building with GCC 4.1 will show the error:

lib/libc/isc/ev_timers.c:53: error: static declaration of '__evOptMonoTime' follows non-static declaration
lib/libc/isc/eventlib_p.h:283: error: previous declaration of '__evOptMonoTime' was here

Index: fbsd-6.2/lib/libc/isc/ev_timers.c
--- fbsd-6.2.orig/lib/libc/isc/ev_timers.c
+++ fbsd-6.2/lib/libc/isc/ev_timers.c
@@ -50,7 +50,7 @@ __FBSDID("$FreeBSD: src/lib/libc/isc/ev_
 /* Forward. */

 #ifdef _LIBC
-static int     __evOptMonoTime;
+int    __evOptMonoTime;
 static int due_sooner(void *, void *);
 static void set_index(void *, int);


More information about the freebsd-bugs mailing list