Skip to content

Commit 847d1d0

Browse files
cyrus-sasl: add missing time.h header (#24003)
* cyrus-sasl: clang buildfix * unused imports * Revert conanfile.py changes Signed-off-by: Uilian Ries <[email protected]> * Avoid exposing author data Signed-off-by: Uilian Ries <[email protected]> * Do not touch configure.ac to avoid reconfigure Signed-off-by: Uilian Ries <[email protected]> * Revert "Do not touch configure.ac to avoid reconfigure" This reverts commit 96da6a5. * Run autoreconf due patch for time.h Signed-off-by: Uilian Ries <[email protected]> * Install aclocal as tool requirement Signed-off-by: Uilian Ries <[email protected]> * Avoid running autoreconf Signed-off-by: Uilian Ries <[email protected]> --------- Signed-off-by: Uilian Ries <[email protected]> Co-authored-by: Uilian Ries <[email protected]>
1 parent 443442b commit 847d1d0

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

recipes/cyrus-sasl/all/conandata.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ sources:
77
sha256: "26866b1549b00ffd020f188a43c258017fa1c382b3ddadd8201536f72efb05d5"
88
patches:
99
"2.1.28":
10+
- patch_file: "patches/0001-Fix-time.h.patch"
11+
patch_description: "patch"
12+
patch_type: "portability"
1013
- patch_file: "patches/0001-use-attr-on-gnu.patch"
1114
patch_source: https://github.com/cyrusimap/cyrus-sasl/commit/06f41c41e5c0f62ed5c1d703a9e2da42dfdb71f6
1215
patch_description: "Fix https://github.com/cyrusimap/cyrus-sasl/issues/831"
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
From 266f0acf7f5e029afbb3e263437039e50cd6c262 Mon Sep 17 00:00:00 2001
2+
From: Sam James <>
3+
Date: Wed, 23 Feb 2022 00:45:15 +0000
4+
Subject: [PATCH] Fix <time.h> check
5+
MIME-Version: 1.0
6+
Content-Type: text/plain; charset=UTF-8
7+
Content-Transfer-Encoding: 8bit
8+
9+
We're conditionally including based on HAVE_TIME_H in a bunch of places,
10+
but we're not actually checking for time.h, so that's never going to be defined.
11+
12+
While at it, add in a missing include in the cram plugin.
13+
14+
This fixes a bunch of implicit declaration warnings:
15+
```
16+
* cyrus-sasl-2.1.28/lib/saslutil.c:280:3: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration]
17+
* cyrus-sasl-2.1.28/lib/saslutil.c:364:41: warning: implicit declaration of function ‘clock’ [-Wimplicit-function-declaration]
18+
* cyrus-sasl-2.1.28/plugins/cram.c:132:7: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration]
19+
* cyrus-sasl-2.1.28/lib/saslutil.c:280:3: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration]
20+
* cyrus-sasl-2.1.28/lib/saslutil.c:364:41: warning: implicit declaration of function ‘clock’ [-Wimplicit-function-declaration]
21+
* cyrus-sasl-2.1.28/plugins/cram.c:132:7: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration]
22+
```
23+
24+
https://github.com/cyrusimap/cyrus-sasl/commit/266f0acf7f5e029afbb3e263437039e50cd6c262
25+
26+
--- a/lib/saslutil.c
27+
+++ b/lib/saslutil.c
28+
@@ -59,9 +59,7 @@
29+
#ifdef HAVE_UNISTD_H
30+
#include <unistd.h>
31+
#endif
32+
-#ifdef HAVE_TIME_H
33+
#include <time.h>
34+
-#endif
35+
#include "saslint.h"
36+
#include <saslutil.h>
37+
38+
--- a/plugins/cram.c
39+
+++ b/plugins/cram.c
40+
@@ -53,6 +53,7 @@
41+
#endif
42+
#include <fcntl.h>
43+
44+
+#include <time.h>
45+
#include <sasl.h>
46+
#include <saslplug.h>
47+
#include <saslutil.h>

0 commit comments

Comments
 (0)