mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-29 03:28:14 +02:00
30 lines
987 B
Diff
30 lines
987 B
Diff
|
Fix -Wincompatible-pointer-types error with gcc 14 on 32-bit arches.
|
||
|
|
||
|
```
|
||
|
/home/buildozer/aports/main/ddate/src/ddate-0.2.2/ddate.c: In function 'main':
|
||
|
/home/buildozer/aports/main/ddate/src/ddate-0.2.2/ddate.c:234:24: error:
|
||
|
passing argument 1 of 'localtime' from incompatible pointer type
|
||
|
[-Wincompatible-pointer-types]
|
||
|
234 | eris=localtime(&t);
|
||
|
| ^~
|
||
|
| |
|
||
|
| long int *
|
||
|
In file included from /home/buildozer/aports/main/ddate/src/ddate-0.2.2/ddate.c:75:
|
||
|
/usr/include/time.h:60:23: note: expected 'const time_t *' {aka 'const long
|
||
|
long int *'} but argument is of type 'long int *'
|
||
|
60 | struct tm *localtime (const time_t *);
|
||
|
| ^~~~~~~~~~~~~~
|
||
|
```
|
||
|
|
||
|
--- ddate-0.2.2-origin/ddate.c
|
||
|
+++ ddate-0.2.2/ddate.c
|
||
|
@@ -183,7 +183,7 @@
|
||
|
|
||
|
int
|
||
|
main (int argc, char *argv[]) {
|
||
|
- long t;
|
||
|
+ time_t t;
|
||
|
struct tm *eris;
|
||
|
int bob,raw;
|
||
|
struct disc_time hastur;
|