pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/25593: Declaration of gettimeofday prevents compilation



>Number:         25593
>Category:       pkg
>Synopsis:       The declaration of gettimeofday() differs from that in 
><sys/time.h>.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 16 11:16:01 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     John R. Shannon
>Release:        NetBSD 2.0E
>Organization:
        johnrshannon.com
>Environment:
System: NetBSD colleen.internal.johnrshannon.com 2.0E NetBSD 2.0E (KERNEL) #0: 
Thu May 13 06:22:04 MDT 2004  
root%colleen.internal.johnrshannon.com@localhost:/usr/obj/usr/src/sys/arch/i386/compile/KERNEL
 i386
Architecture: i386
Machine: i386
>Description:
        Bind defines gettimeofday() as isc__gettimeofday() which, in turn, is 
declared with
        a signature differing from that in <sys/time.h>. This prevents 
compilation of code
        where both declarations are visable. They differ in the second 
argument: <sys/time.h>
        has a void* while isc__gettimeofday has struct timezone*. Bind's 
supplied convienience 
        function ignores the second parameter so we can safely use NetBSD's 
declaration
        of gettimeofday(). The supplied patch does this.
>How-To-Repeat:
        
>Fix:

$NetBSD$

--- lib/bind/port_after.h.in.orig       2003-06-26 21:51:35.000000000 -0600
+++ lib/bind/port_after.h.in
@@ -358,11 +358,11 @@ void endpwent_r(void);
int setpassent(int stayopen);
#endif

-#define gettimeofday isc__gettimeofday
#ifdef NEED_GETTIMEOFDAY
+#define gettimeofday isc__gettimeofday
int isc__gettimeofday(struct timeval *tvp, struct _TIMEZONE *tzp);
#else
-int isc__gettimeofday(struct timeval *tp, struct timezone *tzp);
+#include <sys/time.h>
#endif

int getnetgrent(char **machinep, char **userp, char **domainp);

>Release-Note:
>Audit-Trail:
>Unformatted:
        This prevents compilation when both declarations are visable.



Home | Main Index | Thread Index | Old Index