mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-25 11:22:30 +01:00
Fix implicit function declaration and bool type errors.
```
checking if strftime is GNU or Non-GNU... /tmp/strftime_try.c: In function 'main':
/tmp/strftime_try.c:16:8: error: implicit declaration of function 'isdigit' [-Wimplicit-function-declaration]
16 | if (!isdigit(buf[1]))
| ^~~~~~~
/tmp/strftime_try.c:5:1: note: include '<ctype.h>' or provide a declaration of 'isdigit'
4 | #include <sys/time.h>
+++ |+#include <ctype.h>
5 |
ERROR: Could not compile strftime().
```
```
In file included from src/dhash.c:7:
/home/[...]/aports/main/email/src/email-3.1.3/dlib/include/dlib.h:4:16: error: cannot use keyword 'false' as enumeration constant
4 | typedef enum { false, true } bool;
| ^~~~~
/home/[...]/aports/main/email/src/email-3.1.3/dlib/include/dlib.h:4:16: note: 'false' is a keyword with '-std=c23' onwards
```
26 lines
716 B
Diff
26 lines
716 B
Diff
diff -ruN a/check_strftime.sh b/check_strftime.sh
|
|
--- a/check_strftime.sh 2010-10-31 17:09:15.000000000 +0000
|
|
+++ b/check_strftime.sh 2025-07-30 05:09:12.870000000 +0000
|
|
@@ -14,6 +14,7 @@
|
|
#include <stdlib.h>
|
|
#include <time.h>
|
|
#include <sys/time.h>
|
|
+#include <ctype.h>
|
|
|
|
int
|
|
main (void)
|
|
diff -ruN a/dlib/include/dlib.h b/dlib/include/dlib.h
|
|
--- a/dlib/include/dlib.h 2010-09-20 23:44:48.000000000 +0000
|
|
+++ b/dlib/include/dlib.h 2025-07-30 05:42:03.550000000 +0000
|
|
@@ -1,7 +1,9 @@
|
|
#ifndef __DLIB_H
|
|
#define __DLIB_H 1
|
|
|
|
-typedef enum { false, true } bool;
|
|
+#if __STDC_VERSION__ < 202311L
|
|
+ typedef enum { false, true } bool;
|
|
+#endif
|
|
enum { ERROR, SUCCESS, DLIB_MAXBUF = 1024 };
|
|
|
|
#define DLIB_VERSION "0.1b"
|