[brlcad-tracker] [ brlcad-Bugs-1519270 ] Tiny bug prevents compilation on OpenBSD
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: SourceForge.net <no...@so...> - 2006-07-08 16:33:09
|
Bugs item #1519270, was opened at 2006-07-08 16:33 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=640802&aid=1519270&group_id=105292 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Compilation Group: other bug / workaround Status: Open Resolution: None Priority: 5 Submitted By: Karel Kulhavy (clock3) Assigned to: Nobody/Anonymous (nobody) Summary: Tiny bug prevents compilation on OpenBSD Initial Comment: It wipes out on OpenBSD 3.9: gcc -DHAVE_CONFIG_H -I. -I. -I../../../../include -I/usr/X11R6/include -I/usr/local/include -I../../../../include -pipe -fno-strict-aliasing -fno-common -g -c rletorla.c rletorla.c: In function `write_rlb_header': rletorla.c:182: error: conflicting types for `time' /usr/include/time.h:114: error: previous declaration of `time' rletorla.c:182: warning: extern declaration of `time' doesn't match global one rletorla.c:219: warning: passing arg 1 of `ctime' from incompatible pointer type gmake[5]: *** [rletorla.o] Error 1 The following patch fixes it. --- rletorla_old.c Mon Apr 17 16:17:45 2006 +++ rletorla.c Sat Jul 8 18:30:59 2006 @@ -32,6 +32,7 @@ #include <stdlib.h> #include <stdio.h> #include <unistd.h> +#include <time.h> #include "rlb_header.h" #include "rle.h" @@ -179,7 +180,6 @@ char *ctime(); char *d_str; long second; - long time(); bzero(&rlb_head, 740); rlb_head.window.left = minx; @@ -215,7 +215,7 @@ gethostname(rlb_head.machine, 32); #endif strcpy(rlb_head.user, getenv("USER")); - second = time((long *)NULL); + second = time(NULL); d_str = ctime(&second); strncpy(rlb_head.date, &d_str[4], 12); strncpy(&rlb_head.date[12], &d_str[19], 5); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=640802&aid=1519270&group_id=105292 |