#519 closed defect (fixed)
psTime.c fails to build due to gettimeofday's second argument
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | astro | Version: | 0.7.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
psTime.c includes a call:
gettimeofday(&now, (struct timezone *)0)
which fails to compile with gcc 4.0 on os/x 10.4
The latest opengroup documentation on gettimeofday
(see http://www.opengroup.org/onlinepubs/009695399/)
has no mention of a (struct timezone), and requires
that the second argument be a NULL pointer of type
(void *) to avoid undefined behaviour.
The Linux docs (e.g.
still mention (struct timezone) but still require it to be NULL.
The simplest fix is to write the null pointer as 0 or NULL,
without an unnecessary cast.
Change History (4)
comment:1 by , 21 years ago
| Owner: | changed from to |
|---|
comment:2 by , 21 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:3 by , 20 years ago
| Keywords: | VERIFIED added |
|---|
Note:
See TracTickets
for help on using tickets.

Bug has been resolved.... closing.