diff options
author | Kai Kang <kai.kang@windriver.com> | 2024-06-08 20:35:08 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-06-09 16:14:58 -0700 |
commit | f25f77bdf632ab0075c61b4df41a4ffd139e2787 (patch) | |
tree | 07e95a2b70a6497d96c47927bc19289f3c90f372 | |
parent | 751cb7534cd15dbb74a1af8a1a2112db458c7f08 (diff) | |
download | meta-openembedded-f25f77bdf632ab0075c61b4df41a4ffd139e2787.tar.gz |
uw-imap: fix incompatible pointer type errors
Fix compile errors when gcc option '-Wincompatible-pointer-types' set:
mx.c: In function 'mx_setdate':
mx.c:1286:15: error: passing argument 2 of 'utime' from incompatible pointer type [-Wincompatible-pointer-types]
1286 | utime (file,tp); /* set the times */
| ^~
| |
| time_t * {aka long int *}
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch | 355 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb | 1 |
2 files changed, 356 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch b/meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch new file mode 100644 index 000000000..8744cdd10 --- /dev/null +++ b/meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch | |||
@@ -0,0 +1,355 @@ | |||
1 | Fix compile errors when gcc option '-Wincompatible-pointer-types' set: | ||
2 | |||
3 | mx.c: In function 'mx_setdate': | ||
4 | mx.c:1286:15: error: passing argument 2 of 'utime' from incompatible pointer type [-Wincompatible-pointer-types] | ||
5 | 1286 | utime (file,tp); /* set the times */ | ||
6 | | ^~ | ||
7 | | | | ||
8 | | time_t * {aka long int *} | ||
9 | |||
10 | Upstream-Status: Inactive-Upstream [lastrelease: 2011] | ||
11 | |||
12 | [1]: https://en.wikipedia.org/wiki/UW_IMAP | ||
13 | |||
14 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
15 | |||
16 | --- | ||
17 | src/osdep/unix/mbx.c | 12 ++++++------ | ||
18 | src/osdep/unix/mh.c | 2 +- | ||
19 | src/osdep/unix/mmdf.c | 10 +++++----- | ||
20 | src/osdep/unix/mtx.c | 16 ++++++++-------- | ||
21 | src/osdep/unix/mx.c | 2 +- | ||
22 | src/osdep/unix/tenex.c | 16 ++++++++-------- | ||
23 | src/osdep/unix/unix.c | 10 +++++----- | ||
24 | 7 files changed, 34 insertions(+), 34 deletions(-) | ||
25 | |||
26 | diff --git a/src/osdep/unix/mbx.c b/src/osdep/unix/mbx.c | ||
27 | index c8a45a5..0a587fe 100644 | ||
28 | --- a/src/osdep/unix/mbx.c | ||
29 | +++ b/src/osdep/unix/mbx.c | ||
30 | @@ -302,7 +302,7 @@ int mbx_isvalid (MAILSTREAM **stream,char *name,char *tmp,int *ld,char *lock, | ||
31 | if (sbuf.st_ctime > sbuf.st_atime) { | ||
32 | tp[0] = sbuf.st_atime; /* preserve atime and mtime */ | ||
33 | tp[1] = sbuf.st_mtime; | ||
34 | - utime (tmp,tp); /* set the times */ | ||
35 | + utime (tmp, (const struct utimbuf *)tp); /* set the times */ | ||
36 | } | ||
37 | } | ||
38 | /* in case INBOX but not mbx format */ | ||
39 | @@ -776,7 +776,7 @@ void mbx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags) | ||
40 | stream->user_flags[LOCAL->ffuserflag]) || (oldpid != LOCAL->lastpid)) | ||
41 | mbx_update_header (stream); | ||
42 | tp[0] = time (0); /* make sure read comes after all that */ | ||
43 | - utime (stream->mailbox,tp); | ||
44 | + utime (stream->mailbox, (const struct utimbuf *)tp); | ||
45 | } | ||
46 | if (LOCAL->ld >= 0) { /* unlock now */ | ||
47 | unlockfd (LOCAL->ld,LOCAL->lock); | ||
48 | @@ -1075,7 +1075,7 @@ long mbx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) | ||
49 | /* else preserve \Marked status */ | ||
50 | else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); | ||
51 | tp[1] = sbuf.st_mtime; /* preserve mtime */ | ||
52 | - utime (file,tp); /* set the times */ | ||
53 | + utime (file, (const struct utimbuf *)tp); /* set the times */ | ||
54 | close (fd); /* close the file */ | ||
55 | MM_NOCRITICAL (stream); /* release critical */ | ||
56 | unlockfd (ld,lock); /* release exclusive parse/append permission */ | ||
57 | @@ -1213,7 +1213,7 @@ long mbx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data) | ||
58 | /* else preserve \Marked status */ | ||
59 | else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); | ||
60 | tp[1] = sbuf.st_mtime; /* preserve mtime */ | ||
61 | - utime (file,tp); /* set the times */ | ||
62 | + utime (file, (const struct utimbuf *)tp); /* set the times */ | ||
63 | fclose (df); /* close the file */ | ||
64 | MM_NOCRITICAL (dstream); /* release critical */ | ||
65 | } | ||
66 | @@ -1446,7 +1446,7 @@ long mbx_parse (MAILSTREAM *stream) | ||
67 | time_t tp[2]; | ||
68 | tp[0] = time (0); | ||
69 | tp[1] = LOCAL->filetime; | ||
70 | - utime (stream->mailbox,tp); | ||
71 | + utime (stream->mailbox, (const struct utimbuf *)tp); | ||
72 | } | ||
73 | stream->silent = silent; /* can pass up events now */ | ||
74 | mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */ | ||
75 | @@ -1814,7 +1814,7 @@ unsigned long mbx_rewrite (MAILSTREAM *stream,unsigned long *reclaimed, | ||
76 | fstat (LOCAL->fd,&sbuf); /* get new write time */ | ||
77 | tp[1] = LOCAL->filetime = sbuf.st_mtime; | ||
78 | tp[0] = time (0); /* reset atime to now */ | ||
79 | - utime (stream->mailbox,tp); | ||
80 | + utime (stream->mailbox, (const struct utimbuf *)tp); | ||
81 | unlockfd (ld,lock); /* release exclusive parse/append permission */ | ||
82 | /* notify upper level of new mailbox size */ | ||
83 | mail_exists (stream,stream->nmsgs); | ||
84 | diff --git a/src/osdep/unix/mh.c b/src/osdep/unix/mh.c | ||
85 | index 9264624..26f3539 100644 | ||
86 | --- a/src/osdep/unix/mh.c | ||
87 | +++ b/src/osdep/unix/mh.c | ||
88 | @@ -1279,5 +1279,5 @@ void mh_setdate (char *file,MESSAGECACHE *elt) | ||
89 | time_t tp[2]; | ||
90 | tp[0] = time (0); /* atime is now */ | ||
91 | tp[1] = mail_longdate (elt); /* modification time */ | ||
92 | - utime (file,tp); /* set the times */ | ||
93 | + utime (file, (const struct utimbuf *)tp); /* set the times */ | ||
94 | } | ||
95 | diff --git a/src/osdep/unix/mmdf.c b/src/osdep/unix/mmdf.c | ||
96 | index e962434..c0adbee 100644 | ||
97 | --- a/src/osdep/unix/mmdf.c | ||
98 | +++ b/src/osdep/unix/mmdf.c | ||
99 | @@ -379,7 +379,7 @@ long mmdf_isvalid (char *name,char *tmp) | ||
100 | if ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) { | ||
101 | tp[0] = sbuf.st_atime; /* preserve atime and mtime */ | ||
102 | tp[1] = sbuf.st_mtime; | ||
103 | - utime (file,tp); /* set the times */ | ||
104 | + utime (file, (const struct utimbuf *)tp); /* set the times */ | ||
105 | } | ||
106 | } | ||
107 | } | ||
108 | @@ -1131,7 +1131,7 @@ long mmdf_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) | ||
109 | else tp[0] = /* else preserve \Marked status */ | ||
110 | ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) ? | ||
111 | sbuf.st_atime : tp[1]; | ||
112 | - utime (file,tp); /* set the times */ | ||
113 | + utime (file, (const struct utimbuf *)tp); /* set the times */ | ||
114 | mmdf_unlock (fd,NIL,&lock); /* unlock and close mailbox */ | ||
115 | if (tstream) { /* update last UID if we can */ | ||
116 | MMDFLOCAL *local = (MMDFLOCAL *) tstream->local; | ||
117 | @@ -1292,7 +1292,7 @@ long mmdf_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data) | ||
118 | ret = NIL; /* return error */ | ||
119 | } | ||
120 | else tp[0] = tp[1] - 1; /* set atime to now-1 if successful copy */ | ||
121 | - utime (file,tp); /* set the times */ | ||
122 | + utime (file, (const struct utimbuf *)tp); /* set the times */ | ||
123 | fclose (sf); /* done with scratch file */ | ||
124 | /* force UIDVALIDITY assignment now */ | ||
125 | if (tstream && !tstream->uid_validity) tstream->uid_validity = time (0); | ||
126 | @@ -1550,7 +1550,7 @@ void mmdf_unlock (int fd,MAILSTREAM *stream,DOTLOCK *lock) | ||
127 | } | ||
128 | else now = 0; /* no time change needed */ | ||
129 | /* set the times, note change */ | ||
130 | - if (now && !utime (stream->mailbox,tp)) LOCAL->filetime = tp[1]; | ||
131 | + if (now && !utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1]; | ||
132 | } | ||
133 | flock (fd,LOCK_UN); /* release flock'ers */ | ||
134 | if (!stream) close (fd); /* close the file if no stream */ | ||
135 | @@ -2393,7 +2393,7 @@ long mmdf_rewrite (MAILSTREAM *stream,unsigned long *nexp,DOTLOCK *lock, | ||
136 | /* set atime to now, mtime a second earlier */ | ||
137 | tp[1] = (tp[0] = time (0)) - 1; | ||
138 | /* set the times, note change */ | ||
139 | - if (!utime (stream->mailbox,tp)) LOCAL->filetime = tp[1]; | ||
140 | + if (!utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1]; | ||
141 | close (LOCAL->fd); /* close and reopen file */ | ||
142 | if ((LOCAL->fd = open (stream->mailbox,O_RDWR, | ||
143 | (long) mail_parameters (NIL,GET_MBXPROTECTION,NIL))) | ||
144 | diff --git a/src/osdep/unix/mtx.c b/src/osdep/unix/mtx.c | ||
145 | index 8e6f76e..f64142b 100644 | ||
146 | --- a/src/osdep/unix/mtx.c | ||
147 | +++ b/src/osdep/unix/mtx.c | ||
148 | @@ -196,7 +196,7 @@ int mtx_isvalid (char *name,char *tmp) | ||
149 | if (sbuf.st_ctime > sbuf.st_atime) { | ||
150 | tp[0] = sbuf.st_atime; /* preserve atime and mtime */ | ||
151 | tp[1] = sbuf.st_mtime; | ||
152 | - utime (file,tp); /* set the times */ | ||
153 | + utime (file, (const struct utimbuf *)tp); /* set the times */ | ||
154 | } | ||
155 | } | ||
156 | } | ||
157 | @@ -565,7 +565,7 @@ void mtx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags) | ||
158 | fstat (LOCAL->fd,&sbuf); /* get current write time */ | ||
159 | tp[1] = LOCAL->filetime = sbuf.st_mtime; | ||
160 | tp[0] = time (0); /* make sure read comes after all that */ | ||
161 | - utime (stream->mailbox,tp); | ||
162 | + utime (stream->mailbox, (const struct utimbuf *)tp); | ||
163 | } | ||
164 | } | ||
165 | |||
166 | @@ -834,7 +834,7 @@ long mtx_expunge (MAILSTREAM *stream,char *sequence,long options) | ||
167 | fstat (LOCAL->fd,&sbuf); /* get new write time */ | ||
168 | tp[1] = LOCAL->filetime = sbuf.st_mtime; | ||
169 | tp[0] = time (0); /* reset atime to now */ | ||
170 | - utime (stream->mailbox,tp); | ||
171 | + utime (stream->mailbox, (const struct utimbuf *)tp); | ||
172 | MM_NOCRITICAL (stream); /* release critical */ | ||
173 | /* notify upper level of new mailbox size */ | ||
174 | mail_exists (stream,stream->nmsgs); | ||
175 | @@ -929,7 +929,7 @@ long mtx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) | ||
176 | /* else preserve \Marked status */ | ||
177 | else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); | ||
178 | tp[1] = sbuf.st_mtime; /* preserve mtime */ | ||
179 | - utime (file,tp); /* set the times */ | ||
180 | + utime (file, (const struct utimbuf *)tp); /* set the times */ | ||
181 | close (fd); /* close the file */ | ||
182 | unlockfd (ld,lock); /* release exclusive parse/append permission */ | ||
183 | MM_NOCRITICAL (stream); /* release critical */ | ||
184 | @@ -946,7 +946,7 @@ long mtx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) | ||
185 | fstat (LOCAL->fd,&sbuf); /* get current write time */ | ||
186 | tp[1] = LOCAL->filetime = sbuf.st_mtime; | ||
187 | tp[0] = time (0); /* make sure atime remains greater */ | ||
188 | - utime (stream->mailbox,tp); | ||
189 | + utime (stream->mailbox, (const struct utimbuf *)tp); | ||
190 | } | ||
191 | } | ||
192 | if (ret && mail_parameters (NIL,GET_COPYUID,NIL)) | ||
193 | @@ -1062,7 +1062,7 @@ long mtx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data) | ||
194 | /* else preserve \Marked status */ | ||
195 | else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); | ||
196 | tp[1] = sbuf.st_mtime; /* preserve mtime */ | ||
197 | - utime (file,tp); /* set the times */ | ||
198 | + utime (file, (const struct utimbuf *)tp); /* set the times */ | ||
199 | fclose (df); /* close the file */ | ||
200 | unlockfd (ld,lock); /* release exclusive parse/append permission */ | ||
201 | MM_NOCRITICAL (stream); /* release critical */ | ||
202 | @@ -1212,7 +1212,7 @@ long mtx_parse (MAILSTREAM *stream) | ||
203 | time_t tp[2]; | ||
204 | tp[0] = time (0); | ||
205 | tp[1] = LOCAL->filetime; | ||
206 | - utime (stream->mailbox,tp); | ||
207 | + utime (stream->mailbox, (const struct utimbuf *)tp); | ||
208 | } | ||
209 | stream->silent = silent; /* can pass up events now */ | ||
210 | mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */ | ||
211 | @@ -1312,7 +1312,7 @@ void mtx_update_status (MAILSTREAM *stream,unsigned long msgno,long syncflag) | ||
212 | fstat (LOCAL->fd,&sbuf); /* get new write time */ | ||
213 | tp[1] = LOCAL->filetime = sbuf.st_mtime; | ||
214 | tp[0] = time (0); /* make sure read is later */ | ||
215 | - utime (stream->mailbox,tp); | ||
216 | + utime (stream->mailbox, (const struct utimbuf *)tp); | ||
217 | } | ||
218 | } | ||
219 | } | ||
220 | diff --git a/src/osdep/unix/mx.c b/src/osdep/unix/mx.c | ||
221 | index b5c5adf..4146409 100644 | ||
222 | --- a/src/osdep/unix/mx.c | ||
223 | +++ b/src/osdep/unix/mx.c | ||
224 | @@ -1283,5 +1283,5 @@ void mx_setdate (char *file,MESSAGECACHE *elt) | ||
225 | time_t tp[2]; | ||
226 | tp[0] = time (0); /* atime is now */ | ||
227 | tp[1] = mail_longdate (elt); /* modification time */ | ||
228 | - utime (file,tp); /* set the times */ | ||
229 | + utime (file, (const struct utimbuf *)tp); /* set the times */ | ||
230 | } | ||
231 | diff --git a/src/osdep/unix/tenex.c b/src/osdep/unix/tenex.c | ||
232 | index eee61fb..622da61 100644 | ||
233 | --- a/src/osdep/unix/tenex.c | ||
234 | +++ b/src/osdep/unix/tenex.c | ||
235 | @@ -203,7 +203,7 @@ int tenex_isvalid (char *name,char *tmp) | ||
236 | if (sbuf.st_ctime > sbuf.st_atime) { | ||
237 | tp[0] = sbuf.st_atime; /* preserve atime and mtime */ | ||
238 | tp[1] = sbuf.st_mtime; | ||
239 | - utime (file,tp); /* set the times */ | ||
240 | + utime (file, (const struct utimbuf *)tp); /* set the times */ | ||
241 | } | ||
242 | } | ||
243 | } | ||
244 | @@ -654,7 +654,7 @@ void tenex_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags) | ||
245 | fstat (LOCAL->fd,&sbuf); /* get current write time */ | ||
246 | tp[1] = LOCAL->filetime = sbuf.st_mtime; | ||
247 | tp[0] = time (0); /* make sure read comes after all that */ | ||
248 | - utime (stream->mailbox,tp); | ||
249 | + utime (stream->mailbox, (const struct utimbuf *)tp); | ||
250 | } | ||
251 | } | ||
252 | |||
253 | @@ -924,7 +924,7 @@ long tenex_expunge (MAILSTREAM *stream,char *sequence,long options) | ||
254 | fstat (LOCAL->fd,&sbuf); /* get new write time */ | ||
255 | tp[1] = LOCAL->filetime = sbuf.st_mtime; | ||
256 | tp[0] = time (0); /* reset atime to now */ | ||
257 | - utime (stream->mailbox,tp); | ||
258 | + utime (stream->mailbox, (const struct utimbuf *)tp); | ||
259 | MM_NOCRITICAL (stream); /* release critical */ | ||
260 | /* notify upper level of new mailbox size */ | ||
261 | mail_exists (stream,stream->nmsgs); | ||
262 | @@ -1019,7 +1019,7 @@ long tenex_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) | ||
263 | /* else preserve \Marked status */ | ||
264 | else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); | ||
265 | tp[1] = sbuf.st_mtime; /* preserve mtime */ | ||
266 | - utime (file,tp); /* set the times */ | ||
267 | + utime (file, (const struct utimbuf *)tp); /* set the times */ | ||
268 | close (fd); /* close the file */ | ||
269 | unlockfd (ld,lock); /* release exclusive parse/append permission */ | ||
270 | MM_NOCRITICAL (stream); /* release critical */ | ||
271 | @@ -1036,7 +1036,7 @@ long tenex_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) | ||
272 | fstat (LOCAL->fd,&sbuf); /* get current write time */ | ||
273 | tp[1] = LOCAL->filetime = sbuf.st_mtime; | ||
274 | tp[0] = time (0); /* make sure atime remains greater */ | ||
275 | - utime (stream->mailbox,tp); | ||
276 | + utime (stream->mailbox, (const struct utimbuf *)tp); | ||
277 | } | ||
278 | } | ||
279 | if (ret && mail_parameters (NIL,GET_COPYUID,NIL)) | ||
280 | @@ -1159,7 +1159,7 @@ long tenex_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data) | ||
281 | /* else preserve \Marked status */ | ||
282 | else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0); | ||
283 | tp[1] = sbuf.st_mtime; /* preserve mtime */ | ||
284 | - utime (file,tp); /* set the times */ | ||
285 | + utime (file, (const struct utimbuf *)tp); /* set the times */ | ||
286 | fclose (df); /* close the file */ | ||
287 | unlockfd (ld,lock); /* release exclusive parse/append permission */ | ||
288 | MM_NOCRITICAL (stream); /* release critical */ | ||
289 | @@ -1324,7 +1324,7 @@ long tenex_parse (MAILSTREAM *stream) | ||
290 | time_t tp[2]; | ||
291 | tp[0] = time (0); | ||
292 | tp[1] = LOCAL->filetime; | ||
293 | - utime (stream->mailbox,tp); | ||
294 | + utime (stream->mailbox, (const struct utimbuf *)tp); | ||
295 | } | ||
296 | stream->silent = silent; /* can pass up events now */ | ||
297 | mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */ | ||
298 | @@ -1424,7 +1424,7 @@ void tenex_update_status (MAILSTREAM *stream,unsigned long msgno,long syncflag) | ||
299 | fstat (LOCAL->fd,&sbuf); /* get new write time */ | ||
300 | tp[1] = LOCAL->filetime = sbuf.st_mtime; | ||
301 | tp[0] = time (0); /* make sure read is later */ | ||
302 | - utime (stream->mailbox,tp); | ||
303 | + utime (stream->mailbox, (const struct utimbuf *)tp); | ||
304 | } | ||
305 | } | ||
306 | } | ||
307 | diff --git a/src/osdep/unix/unix.c b/src/osdep/unix/unix.c | ||
308 | index 86be3f9..012dc83 100644 | ||
309 | --- a/src/osdep/unix/unix.c | ||
310 | +++ b/src/osdep/unix/unix.c | ||
311 | @@ -232,7 +232,7 @@ DRIVER *unix_valid (char *name) | ||
312 | if ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) { | ||
313 | tp[0] = sbuf.st_atime; /* yes, preserve atime and mtime */ | ||
314 | tp[1] = sbuf.st_mtime; | ||
315 | - utime (file,tp); /* set the times */ | ||
316 | + utime (file, (const struct utimbuf *)tp); /* set the times */ | ||
317 | } | ||
318 | } | ||
319 | } | ||
320 | @@ -999,7 +999,7 @@ long unix_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options) | ||
321 | else tp[0] = /* else preserve \Marked status */ | ||
322 | ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) ? | ||
323 | sbuf.st_atime : tp[1]; | ||
324 | - utime (file,tp); /* set the times */ | ||
325 | + utime (file, (const struct utimbuf *)tp); /* set the times */ | ||
326 | unix_unlock (fd,NIL,&lock); /* unlock and close mailbox */ | ||
327 | if (tstream) { /* update last UID if we can */ | ||
328 | UNIXLOCAL *local = (UNIXLOCAL *) tstream->local; | ||
329 | @@ -1160,7 +1160,7 @@ long unix_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data) | ||
330 | ret = NIL; /* return error */ | ||
331 | } | ||
332 | else tp[0] = tp[1] - 1; /* set atime to now-1 if successful copy */ | ||
333 | - utime (file,tp); /* set the times */ | ||
334 | + utime (file, (const struct utimbuf *)tp); /* set the times */ | ||
335 | fclose (sf); /* done with scratch file */ | ||
336 | /* force UIDVALIDITY assignment now */ | ||
337 | if (tstream && !tstream->uid_validity) tstream->uid_validity = time (0); | ||
338 | @@ -1425,7 +1425,7 @@ void unix_unlock (int fd,MAILSTREAM *stream,DOTLOCK *lock) | ||
339 | } | ||
340 | else now = 0; /* no time change needed */ | ||
341 | /* set the times, note change */ | ||
342 | - if (now && !utime (stream->mailbox,tp)) LOCAL->filetime = tp[1]; | ||
343 | + if (now && !utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1]; | ||
344 | } | ||
345 | flock (fd,LOCK_UN); /* release flock'ers */ | ||
346 | if (!stream) close (fd); /* close the file if no stream */ | ||
347 | @@ -2251,7 +2251,7 @@ long unix_rewrite (MAILSTREAM *stream,unsigned long *nexp,DOTLOCK *lock, | ||
348 | /* set atime to now, mtime a second earlier */ | ||
349 | tp[1] = (tp[0] = time (0)) - 1; | ||
350 | /* set the times, note change */ | ||
351 | - if (!utime (stream->mailbox,tp)) LOCAL->filetime = tp[1]; | ||
352 | + if (!utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1]; | ||
353 | close (LOCAL->fd); /* close and reopen file */ | ||
354 | if ((LOCAL->fd = open (stream->mailbox,O_RDWR, | ||
355 | (long) mail_parameters (NIL,GET_MBXPROTECTION,NIL))) | ||
diff --git a/meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb b/meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb index 17faa3aa6..7e3bddb58 100644 --- a/meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb +++ b/meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb | |||
@@ -16,6 +16,7 @@ SRC_URI = "https://fossies.org/linux/misc/old/imap-${PV}.tar.gz \ | |||
16 | file://0002-tmail-Include-ctype.h-for-isdigit.patch \ | 16 | file://0002-tmail-Include-ctype.h-for-isdigit.patch \ |
17 | file://0001-Fix-Wincompatible-function-pointer-types.patch \ | 17 | file://0001-Fix-Wincompatible-function-pointer-types.patch \ |
18 | file://uw-imap-newer-tls.patch \ | 18 | file://uw-imap-newer-tls.patch \ |
19 | file://uw-imap-fix-incompatible-pointer-types.patch \ | ||
19 | " | 20 | " |
20 | 21 | ||
21 | SRC_URI[md5sum] = "2126fd125ea26b73b20f01fcd5940369" | 22 | SRC_URI[md5sum] = "2126fd125ea26b73b20f01fcd5940369" |