1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
From: Arnaud Rebillout <arnaudr@kali.org>
Date: Mon, 27 May 2024 10:13:10 +0700
Subject: Fix implicit-function-declaration errors
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
```
rules.c: In function ‘Char2Int’:
rules.c:477:18: error: implicit declaration of function ‘elcid_pwsize’ [-Werror=implicit-function-declaration]
477 | pwsize = elcid_pwsize();
```
```
elcid.c: In function ‘elcid_test’:
elcid.c:33:18: error: implicit declaration of function ‘crypt’ [-Werror=implicit-function-declaration]
33 | #define CRYPTALG crypt
```
```
cracker.c: In function ‘Logger’:
cracker.c:108:5: error: implicit declaration of function ‘time’ [-Werror=implicit-function-declaration]
108 | time(&t);
```
---
src/lib/rules.c | 3 +++
src/util/cracker.c | 2 ++
src/util/elcid.c | 1 +
src/util/elcid.c,bsd | 1 +
4 files changed, 7 insertions(+)
diff --git a/src/lib/rules.c b/src/lib/rules.c
index 5d4a8af..3525287 100644
--- a/src/lib/rules.c
+++ b/src/lib/rules.c
@@ -466,6 +466,9 @@ char class;
/* -------- BACK TO NORMALITY -------- */
+// defined in src/util/elcid.c
+extern int elcid_pwsize();
+
int
Char2Int(character)
char character;
diff --git a/src/util/cracker.c b/src/util/cracker.c
index 8e73636..5d8d52c 100644
--- a/src/util/cracker.c
+++ b/src/util/cracker.c
@@ -9,6 +9,8 @@
# document which accompanies distributions of Crack v5.0 and upwards.
*/
+#include <time.h>
+
#include "libcrack.h"
#include "elcid.h"
diff --git a/src/util/elcid.c b/src/util/elcid.c
index 6c52753..0bc4386 100644
--- a/src/util/elcid.c
+++ b/src/util/elcid.c
@@ -30,6 +30,7 @@ static char private_salt[SALTSIZE + 1];
#define CRYPTALG fcrypt
#endif /* CRYPT16 */
#ifndef CRYPTALG /* fall thry default */
+#include <crypt.h>
#define CRYPTALG crypt
#endif /* CRYPTALG */
diff --git a/src/util/elcid.c,bsd b/src/util/elcid.c,bsd
index b5a0048..2e63a4d 100644
--- a/src/util/elcid.c,bsd
+++ b/src/util/elcid.c,bsd
@@ -33,6 +33,7 @@ static char private_salt[SALTSIZE + 1];
#undef CRYPT16
#undef CRYPTALG
+#include <crypt.h>
#define CRYPTALG crypt
#define EBS 1024 /* BIG number - and why not ? */
|