Skip to contentSkip to conversation

xscreensaver: drop removal for CONFIGUREOPTS

PATCH Superseded [email protected] 2 participants 10 messages Jun 6, 2024 – Jun 8, 2024

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 xscreensaver: drop removal for CONFIGUREOPTS

From: Kai Kang <[email protected]>

The options in removal for CONFIGUREOPTS have been handled in oe-core so they are not needed any more.

---
 meta-oe/recipes-graphics/xscreensaver/xscreensaver_6.04.bb | 1 -
 1 file changed, 1 deletion(-)
meta-oe/recipes-graphics/xscreensaver/xscreensaver_6.04.bb +0 -1
index c06c9e96b..88dbb850d 100644
@@ -34,7 +34,6 @@ PACKAGECONFIG = "png ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd',
 PACKAGECONFIG[systemd] = "--with-systemd=yes,--with-systemd=no,systemd"
 PACKAGECONFIG[png] = "--with-png=yes,--with-png=no,libpng"
 
-CONFIGUREOPTS:remove = "--disable-silent-rules --disable-dependency-tracking ${@append_libtool_sysroot(d)}"
 EXTRA_OECONF:remove = "--disable-static"
 
 do_install:append() {
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/4 uw-imap: fix compile errors of incompatible pointer type

From: Kai Kang <[email protected]>

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 *}
---
 ...-imap-fix-incompatible-pointer-types.patch | 354 ++++++++++++++++++
 .../recipes-devtools/uw-imap/uw-imap_2007f.bb |   1 +
 2 files changed, 355 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch
meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch new file +354 -0
new file mode 100644
index 000000000..7146fbbeb
@@ -0,0 +1,354 @@
+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 *}
+
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <[email protected]>
+
+---
+ src/osdep/unix/mbx.c       |  12 ++++++------
+ src/osdep/unix/mh.c        |   2 +-
+ src/osdep/unix/mmdf.c      |  10 +++++-----
+ src/osdep/unix/mtx.c       |  16 ++++++++--------
+ src/osdep/unix/mx.c        |   2 +-
+ src/osdep/unix/tenex.c     |  16 ++++++++--------
+ src/osdep/unix/unix.c      |  10 +++++-----
+ 7 files changed, 34 insertions(+), 34 deletions(-)
+
+diff --git a/src/osdep/unix/mbx.c b/src/osdep/unix/mbx.c
+index c8a45a5..0a587fe 100644
+--- a/src/osdep/unix/mbx.c
++++ b/src/osdep/unix/mbx.c
+@@ -302,7 +302,7 @@ int mbx_isvalid (MAILSTREAM **stream,char *name,char *tmp,int *ld,char *lock,
+     if (sbuf.st_ctime > sbuf.st_atime) {
+       tp[0] = sbuf.st_atime;	/* preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (tmp,tp);		/* set the times */
++      utime (tmp, (const struct utimbuf *)tp);		/* set the times */
+     }
+   }
+ 				/* in case INBOX but not mbx format */
+@@ -776,7 +776,7 @@ void mbx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags)
+ 	 stream->user_flags[LOCAL->ffuserflag]) || (oldpid != LOCAL->lastpid))
+       mbx_update_header (stream);
+     tp[0] = time (0);		/* make sure read comes after all that */
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   if (LOCAL->ld >= 0) {		/* unlock now */
+     unlockfd (LOCAL->ld,LOCAL->lock);
+@@ -1075,7 +1075,7 @@ long mbx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+ 				/* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;	/* preserve mtime */
+-  utime (file,tp);		/* set the times */
++  utime (file, (const struct utimbuf *)tp);		/* set the times */
+   close (fd);			/* close the file */
+   MM_NOCRITICAL (stream);	/* release critical */
+   unlockfd (ld,lock);		/* release exclusive parse/append permission */
+@@ -1213,7 +1213,7 @@ long mbx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+ 				/* else preserve \Marked status */
+     else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+     tp[1] = sbuf.st_mtime;	/* preserve mtime */
+-    utime (file,tp);		/* set the times */
++    utime (file, (const struct utimbuf *)tp);		/* set the times */
+     fclose (df);		/* close the file */
+     MM_NOCRITICAL (dstream);	/* release critical */
+   }
+@@ -1446,7 +1446,7 @@ long mbx_parse (MAILSTREAM *stream)
+     time_t tp[2];
+     tp[0] = time (0);
+     tp[1] = LOCAL->filetime;
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   stream->silent = silent;	/* can pass up events now */
+   mail_exists (stream,nmsgs);	/* notify upper level of new mailbox size */
+@@ -1814,7 +1814,7 @@ unsigned long mbx_rewrite (MAILSTREAM *stream,unsigned long *reclaimed,
+   fstat (LOCAL->fd,&sbuf);	/* get new write time */
+   tp[1] = LOCAL->filetime = sbuf.st_mtime;
+   tp[0] = time (0);		/* reset atime to now */
+-  utime (stream->mailbox,tp);
++  utime (stream->mailbox, (const struct utimbuf *)tp);
+   unlockfd (ld,lock);		/* release exclusive parse/append permission */
+ 				/* notify upper level of new mailbox size */
+   mail_exists (stream,stream->nmsgs);
+diff --git a/src/osdep/unix/mh.c b/src/osdep/unix/mh.c
+index 9264624..26f3539 100644
+--- a/src/osdep/unix/mh.c
++++ b/src/osdep/unix/mh.c
+@@ -1279,5 +1279,5 @@ void mh_setdate (char *file,MESSAGECACHE *elt)
+   time_t tp[2];
+   tp[0] = time (0);		/* atime is now */
+   tp[1] = mail_longdate (elt);	/* modification time */
+-  utime (file,tp);		/* set the times */
++  utime (file, (const struct utimbuf *)tp);		/* set the times */
+ }
+diff --git a/src/osdep/unix/mmdf.c b/src/osdep/unix/mmdf.c
+index e962434..c0adbee 100644
+--- a/src/osdep/unix/mmdf.c
++++ b/src/osdep/unix/mmdf.c
+@@ -379,7 +379,7 @@ long mmdf_isvalid (char *name,char *tmp)
+       if ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) {
+ 	tp[0] = sbuf.st_atime;	/* preserve atime and mtime */
+ 	tp[1] = sbuf.st_mtime;
+-	utime (file,tp);	/* set the times */
++	utime (file, (const struct utimbuf *)tp);	/* set the times */
+       }
+     }
+   }
+@@ -1131,7 +1131,7 @@ long mmdf_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+   else tp[0] =			/* else preserve \Marked status */
+ 	 ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) ?
+ 	 sbuf.st_atime : tp[1];
+-  utime (file,tp);		/* set the times */
++  utime (file, (const struct utimbuf *)tp);		/* set the times */
+   mmdf_unlock (fd,NIL,&lock);	/* unlock and close mailbox */
+   if (tstream) {		/* update last UID if we can */
+     MMDFLOCAL *local = (MMDFLOCAL *) tstream->local;
+@@ -1292,7 +1292,7 @@ long mmdf_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+     ret = NIL;			/* return error */
+   }
+   else tp[0] = tp[1] - 1;	/* set atime to now-1 if successful copy */
+-  utime (file,tp);		/* set the times */
++  utime (file, (const struct utimbuf *)tp);		/* set the times */
+   fclose (sf);			/* done with scratch file */
+ 				/* force UIDVALIDITY assignment now */
+   if (tstream && !tstream->uid_validity) tstream->uid_validity = time (0);
+@@ -1550,7 +1550,7 @@ void mmdf_unlock (int fd,MAILSTREAM *stream,DOTLOCK *lock)
+     }
+     else now = 0;		/* no time change needed */
+ 				/* set the times, note change */
+-    if (now && !utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (now && !utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+   }
+   flock (fd,LOCK_UN);		/* release flock'ers */
+   if (!stream) close (fd);	/* close the file if no stream */
+@@ -2393,7 +2393,7 @@ long mmdf_rewrite (MAILSTREAM *stream,unsigned long *nexp,DOTLOCK *lock,
+ 				/* set atime to now, mtime a second earlier */
+     tp[1] = (tp[0] = time (0)) - 1;
+ 				/* set the times, note change */
+-    if (!utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (!utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+     close (LOCAL->fd);		/* close and reopen file */
+     if ((LOCAL->fd = open (stream->mailbox,O_RDWR,
+ 			   (long) mail_parameters (NIL,GET_MBXPROTECTION,NIL)))
+diff --git a/src/osdep/unix/mtx.c b/src/osdep/unix/mtx.c
+index 8e6f76e..f64142b 100644
+--- a/src/osdep/unix/mtx.c
++++ b/src/osdep/unix/mtx.c
+@@ -196,7 +196,7 @@ int mtx_isvalid (char *name,char *tmp)
+       if (sbuf.st_ctime > sbuf.st_atime) {
+ 	tp[0] = sbuf.st_atime;	/* preserve atime and mtime */
+ 	tp[1] = sbuf.st_mtime;
+-	utime (file,tp);	/* set the times */
++	utime (file, (const struct utimbuf *)tp);	/* set the times */
+       }
+     }
+   }
+@@ -565,7 +565,7 @@ void mtx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags)
+     fstat (LOCAL->fd,&sbuf);	/* get current write time */
+     tp[1] = LOCAL->filetime = sbuf.st_mtime;
+     tp[0] = time (0);		/* make sure read comes after all that */
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+ }
+ 
+@@ -834,7 +834,7 @@ long mtx_expunge (MAILSTREAM *stream,char *sequence,long options)
+       fstat (LOCAL->fd,&sbuf);	/* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);		/* reset atime to now */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+       MM_NOCRITICAL (stream);	/* release critical */
+ 				/* notify upper level of new mailbox size */
+       mail_exists (stream,stream->nmsgs);
+@@ -929,7 +929,7 @@ long mtx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+ 				/* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;	/* preserve mtime */
+-  utime (file,tp);		/* set the times */
++  utime (file, (const struct utimbuf *)tp);		/* set the times */
+   close (fd);			/* close the file */
+   unlockfd (ld,lock);		/* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);	/* release critical */
+@@ -946,7 +946,7 @@ long mtx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+       fstat (LOCAL->fd,&sbuf);	/* get current write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);		/* make sure atime remains greater */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+   if (ret && mail_parameters (NIL,GET_COPYUID,NIL))
+@@ -1062,7 +1062,7 @@ long mtx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+ 				/* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;	/* preserve mtime */
+-  utime (file,tp);		/* set the times */
++  utime (file, (const struct utimbuf *)tp);		/* set the times */
+   fclose (df);			/* close the file */
+   unlockfd (ld,lock);		/* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);	/* release critical */
+@@ -1212,7 +1212,7 @@ long mtx_parse (MAILSTREAM *stream)
+     time_t tp[2];
+     tp[0] = time (0);
+     tp[1] = LOCAL->filetime;
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   stream->silent = silent;	/* can pass up events now */
+   mail_exists (stream,nmsgs);	/* notify upper level of new mailbox size */
+@@ -1312,7 +1312,7 @@ void mtx_update_status (MAILSTREAM *stream,unsigned long msgno,long syncflag)
+       fstat (LOCAL->fd,&sbuf);	/* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);		/* make sure read is later */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+ }
+diff --git a/src/osdep/unix/mx.c b/src/osdep/unix/mx.c
+index b5c5adf..4146409 100644
+--- a/src/osdep/unix/mx.c
++++ b/src/osdep/unix/mx.c
+@@ -1283,5 +1283,5 @@ void mx_setdate (char *file,MESSAGECACHE *elt)
+   time_t tp[2];
+   tp[0] = time (0);		/* atime is now */
+   tp[1] = mail_longdate (elt);	/* modification time */
+-  utime (file,tp);		/* set the times */
++  utime (file, (const struct utimbuf *)tp);		/* set the times */
+ }
+diff --git a/src/osdep/unix/tenex.c b/src/osdep/unix/tenex.c
+index eee61fb..622da61 100644
+--- a/src/osdep/unix/tenex.c
++++ b/src/osdep/unix/tenex.c
+@@ -203,7 +203,7 @@ int tenex_isvalid (char *name,char *tmp)
+       if (sbuf.st_ctime > sbuf.st_atime) {
+ 	tp[0] = sbuf.st_atime;	/* preserve atime and mtime */
+ 	tp[1] = sbuf.st_mtime;
+-	utime (file,tp);	/* set the times */
++	utime (file, (const struct utimbuf *)tp);	/* set the times */
+       }
+     }
+   }
+@@ -654,7 +654,7 @@ void tenex_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags)
+     fstat (LOCAL->fd,&sbuf);	/* get current write time */
+     tp[1] = LOCAL->filetime = sbuf.st_mtime;
+     tp[0] = time (0);		/* make sure read comes after all that */
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+ }
+ 
+@@ -924,7 +924,7 @@ long tenex_expunge (MAILSTREAM *stream,char *sequence,long options)
+       fstat (LOCAL->fd,&sbuf);	/* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);		/* reset atime to now */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+       MM_NOCRITICAL (stream);	/* release critical */
+ 				/* notify upper level of new mailbox size */
+       mail_exists (stream,stream->nmsgs);
+@@ -1019,7 +1019,7 @@ long tenex_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+ 				/* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;	/* preserve mtime */
+-  utime (file,tp);		/* set the times */
++  utime (file, (const struct utimbuf *)tp);		/* set the times */
+   close (fd);			/* close the file */
+   unlockfd (ld,lock);		/* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);	/* release critical */
+@@ -1036,7 +1036,7 @@ long tenex_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+       fstat (LOCAL->fd,&sbuf);	/* get current write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);		/* make sure atime remains greater */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+   if (ret && mail_parameters (NIL,GET_COPYUID,NIL))
+@@ -1159,7 +1159,7 @@ long tenex_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+ 				/* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;	/* preserve mtime */
+-  utime (file,tp);		/* set the times */
++  utime (file, (const struct utimbuf *)tp);		/* set the times */
+   fclose (df);			/* close the file */
+   unlockfd (ld,lock);		/* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);	/* release critical */
+@@ -1324,7 +1324,7 @@ long tenex_parse (MAILSTREAM *stream)
+     time_t tp[2];
+     tp[0] = time (0);
+     tp[1] = LOCAL->filetime;
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   stream->silent = silent;	/* can pass up events now */
+   mail_exists (stream,nmsgs);	/* notify upper level of new mailbox size */
+@@ -1424,7 +1424,7 @@ void tenex_update_status (MAILSTREAM *stream,unsigned long msgno,long syncflag)
+       fstat (LOCAL->fd,&sbuf);	/* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);		/* make sure read is later */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+ }
+diff --git a/src/osdep/unix/unix.c b/src/osdep/unix/unix.c
+index 86be3f9..012dc83 100644
+--- a/src/osdep/unix/unix.c
++++ b/src/osdep/unix/unix.c
+@@ -232,7 +232,7 @@ DRIVER *unix_valid (char *name)
+       if ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) {
+ 	tp[0] = sbuf.st_atime;	/* yes, preserve atime and mtime */
+ 	tp[1] = sbuf.st_mtime;
+-	utime (file,tp);	/* set the times */
++	utime (file, (const struct utimbuf *)tp);	/* set the times */
+       }
+     }
+   }
+@@ -999,7 +999,7 @@ long unix_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+   else tp[0] =			/* else preserve \Marked status */
+ 	 ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) ?
+ 	 sbuf.st_atime : tp[1];
+-  utime (file,tp);		/* set the times */
++  utime (file, (const struct utimbuf *)tp);		/* set the times */
+   unix_unlock (fd,NIL,&lock);	/* unlock and close mailbox */
+   if (tstream) {		/* update last UID if we can */
+     UNIXLOCAL *local = (UNIXLOCAL *) tstream->local;
+@@ -1160,7 +1160,7 @@ long unix_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+     ret = NIL;			/* return error */
+   }
+   else tp[0] = tp[1] - 1;	/* set atime to now-1 if successful copy */
+-  utime (file,tp);		/* set the times */
++  utime (file, (const struct utimbuf *)tp);		/* set the times */
+   fclose (sf);			/* done with scratch file */
+ 				/* force UIDVALIDITY assignment now */
+   if (tstream && !tstream->uid_validity) tstream->uid_validity = time (0);
+@@ -1425,7 +1425,7 @@ void unix_unlock (int fd,MAILSTREAM *stream,DOTLOCK *lock)
+     }
+     else now = 0;		/* no time change needed */
+ 				/* set the times, note change */
+-    if (now && !utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (now && !utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+   }
+   flock (fd,LOCK_UN);		/* release flock'ers */
+   if (!stream) close (fd);	/* close the file if no stream */
+@@ -2251,7 +2251,7 @@ long unix_rewrite (MAILSTREAM *stream,unsigned long *nexp,DOTLOCK *lock,
+ 				/* set atime to now, mtime a second earlier */
+     tp[1] = (tp[0] = time (0)) - 1;
+ 				/* set the times, note change */
+-    if (!utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (!utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+     close (LOCAL->fd);		/* close and reopen file */
+     if ((LOCAL->fd = open (stream->mailbox,O_RDWR,
+ 			   (long) mail_parameters (NIL,GET_MBXPROTECTION,NIL)))
meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb +1 -0
index 17faa3aa6..7e3bddb58 100644
@@ -16,6 +16,7 @@ SRC_URI = "https://fossies.org/linux/misc/old/imap-${PV}.tar.gz \
            file://0002-tmail-Include-ctype.h-for-isdigit.patch \
            file://0001-Fix-Wincompatible-function-pointer-types.patch \
            file://uw-imap-newer-tls.patch \
+           file://uw-imap-fix-incompatible-pointer-types.patch \
            "
 
 SRC_URI[md5sum] = "2126fd125ea26b73b20f01fcd5940369"
Signature · 1 line
2.34.1
#2 lore raw

Re: [oe] [meta-oe][PATCH 2/4] uw-imap: fix compile errors of incompatible pointer type

this patch is good cleanup patch please submit it upstream as well.

Quoted 403 lines · Kai Kang via lists.openembedded.org

From: Kai Kang <[email protected]>

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 *}
---
 ...-imap-fix-incompatible-pointer-types.patch | 354 ++++++++++++++++++
 .../recipes-devtools/uw-imap/uw-imap_2007f.bb |   1 +
 2 files changed, 355 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch
meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch new file +354 -0
new file mode 100644
index 000000000..7146fbbeb
@@ -0,0 +1,354 @@
+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 *}
+
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <[email protected]>
+
+---
+ src/osdep/unix/mbx.c       |  12 ++++++------
+ src/osdep/unix/mh.c        |   2 +-
+ src/osdep/unix/mmdf.c      |  10 +++++-----
+ src/osdep/unix/mtx.c       |  16 ++++++++--------
+ src/osdep/unix/mx.c        |   2 +-
+ src/osdep/unix/tenex.c     |  16 ++++++++--------
+ src/osdep/unix/unix.c      |  10 +++++-----
+ 7 files changed, 34 insertions(+), 34 deletions(-)
+
+diff --git a/src/osdep/unix/mbx.c b/src/osdep/unix/mbx.c
+index c8a45a5..0a587fe 100644
+--- a/src/osdep/unix/mbx.c
++++ b/src/osdep/unix/mbx.c
+@@ -302,7 +302,7 @@ int mbx_isvalid (MAILSTREAM **stream,char *name,char *tmp,int *ld,char *lock,
+     if (sbuf.st_ctime > sbuf.st_atime) {
+       tp[0] = sbuf.st_atime;  /* preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (tmp,tp);         /* set the times */
++      utime (tmp, (const struct utimbuf *)tp);                /* set the times */
+     }
+   }
+                               /* in case INBOX but not mbx format */
+@@ -776,7 +776,7 @@ void mbx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags)
+        stream->user_flags[LOCAL->ffuserflag]) || (oldpid != LOCAL->lastpid))
+       mbx_update_header (stream);
+     tp[0] = time (0);         /* make sure read comes after all that */
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   if (LOCAL->ld >= 0) {               /* unlock now */
+     unlockfd (LOCAL->ld,LOCAL->lock);
+@@ -1075,7 +1075,7 @@ long mbx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   close (fd);                 /* close the file */
+   MM_NOCRITICAL (stream);     /* release critical */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+@@ -1213,7 +1213,7 @@ long mbx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+                               /* else preserve \Marked status */
+     else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+     tp[1] = sbuf.st_mtime;    /* preserve mtime */
+-    utime (file,tp);          /* set the times */
++    utime (file, (const struct utimbuf *)tp);         /* set the times */
+     fclose (df);              /* close the file */
+     MM_NOCRITICAL (dstream);  /* release critical */
+   }
+@@ -1446,7 +1446,7 @@ long mbx_parse (MAILSTREAM *stream)
+     time_t tp[2];
+     tp[0] = time (0);
+     tp[1] = LOCAL->filetime;
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   stream->silent = silent;    /* can pass up events now */
+   mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */
+@@ -1814,7 +1814,7 @@ unsigned long mbx_rewrite (MAILSTREAM *stream,unsigned long *reclaimed,
+   fstat (LOCAL->fd,&sbuf);    /* get new write time */
+   tp[1] = LOCAL->filetime = sbuf.st_mtime;
+   tp[0] = time (0);           /* reset atime to now */
+-  utime (stream->mailbox,tp);
++  utime (stream->mailbox, (const struct utimbuf *)tp);
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+                               /* notify upper level of new mailbox size */
+   mail_exists (stream,stream->nmsgs);
+diff --git a/src/osdep/unix/mh.c b/src/osdep/unix/mh.c
+index 9264624..26f3539 100644
+--- a/src/osdep/unix/mh.c
++++ b/src/osdep/unix/mh.c
+@@ -1279,5 +1279,5 @@ void mh_setdate (char *file,MESSAGECACHE *elt)
+   time_t tp[2];
+   tp[0] = time (0);           /* atime is now */
+   tp[1] = mail_longdate (elt);        /* modification time */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+ }
+diff --git a/src/osdep/unix/mmdf.c b/src/osdep/unix/mmdf.c
+index e962434..c0adbee 100644
+--- a/src/osdep/unix/mmdf.c
++++ b/src/osdep/unix/mmdf.c
+@@ -379,7 +379,7 @@ long mmdf_isvalid (char *name,char *tmp)
+       if ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) {
+       tp[0] = sbuf.st_atime;  /* preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (file,tp);        /* set the times */
++      utime (file, (const struct utimbuf *)tp);       /* set the times */
+       }
+     }
+   }
+@@ -1131,7 +1131,7 @@ long mmdf_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+   else tp[0] =                        /* else preserve \Marked status */
+        ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) ?
+        sbuf.st_atime : tp[1];
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   mmdf_unlock (fd,NIL,&lock); /* unlock and close mailbox */
+   if (tstream) {              /* update last UID if we can */
+     MMDFLOCAL *local = (MMDFLOCAL *) tstream->local;
+@@ -1292,7 +1292,7 @@ long mmdf_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+     ret = NIL;                        /* return error */
+   }
+   else tp[0] = tp[1] - 1;     /* set atime to now-1 if successful copy */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   fclose (sf);                        /* done with scratch file */
+                               /* force UIDVALIDITY assignment now */
+   if (tstream && !tstream->uid_validity) tstream->uid_validity = time (0);
+@@ -1550,7 +1550,7 @@ void mmdf_unlock (int fd,MAILSTREAM *stream,DOTLOCK *lock)
+     }
+     else now = 0;             /* no time change needed */
+                               /* set the times, note change */
+-    if (now && !utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (now && !utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+   }
+   flock (fd,LOCK_UN);         /* release flock'ers */
+   if (!stream) close (fd);    /* close the file if no stream */
+@@ -2393,7 +2393,7 @@ long mmdf_rewrite (MAILSTREAM *stream,unsigned long *nexp,DOTLOCK *lock,
+                               /* set atime to now, mtime a second earlier */
+     tp[1] = (tp[0] = time (0)) - 1;
+                               /* set the times, note change */
+-    if (!utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (!utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+     close (LOCAL->fd);                /* close and reopen file */
+     if ((LOCAL->fd = open (stream->mailbox,O_RDWR,
+                          (long) mail_parameters (NIL,GET_MBXPROTECTION,NIL)))
+diff --git a/src/osdep/unix/mtx.c b/src/osdep/unix/mtx.c
+index 8e6f76e..f64142b 100644
+--- a/src/osdep/unix/mtx.c
++++ b/src/osdep/unix/mtx.c
+@@ -196,7 +196,7 @@ int mtx_isvalid (char *name,char *tmp)
+       if (sbuf.st_ctime > sbuf.st_atime) {
+       tp[0] = sbuf.st_atime;  /* preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (file,tp);        /* set the times */
++      utime (file, (const struct utimbuf *)tp);       /* set the times */
+       }
+     }
+   }
+@@ -565,7 +565,7 @@ void mtx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags)
+     fstat (LOCAL->fd,&sbuf);  /* get current write time */
+     tp[1] = LOCAL->filetime = sbuf.st_mtime;
+     tp[0] = time (0);         /* make sure read comes after all that */
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+ }
+
+@@ -834,7 +834,7 @@ long mtx_expunge (MAILSTREAM *stream,char *sequence,long options)
+       fstat (LOCAL->fd,&sbuf);        /* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* reset atime to now */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+       MM_NOCRITICAL (stream); /* release critical */
+                               /* notify upper level of new mailbox size */
+       mail_exists (stream,stream->nmsgs);
+@@ -929,7 +929,7 @@ long mtx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   close (fd);                 /* close the file */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);     /* release critical */
+@@ -946,7 +946,7 @@ long mtx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+       fstat (LOCAL->fd,&sbuf);        /* get current write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* make sure atime remains greater */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+   if (ret && mail_parameters (NIL,GET_COPYUID,NIL))
+@@ -1062,7 +1062,7 @@ long mtx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   fclose (df);                        /* close the file */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);     /* release critical */
+@@ -1212,7 +1212,7 @@ long mtx_parse (MAILSTREAM *stream)
+     time_t tp[2];
+     tp[0] = time (0);
+     tp[1] = LOCAL->filetime;
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   stream->silent = silent;    /* can pass up events now */
+   mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */
+@@ -1312,7 +1312,7 @@ void mtx_update_status (MAILSTREAM *stream,unsigned long msgno,long syncflag)
+       fstat (LOCAL->fd,&sbuf);        /* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* make sure read is later */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+ }
+diff --git a/src/osdep/unix/mx.c b/src/osdep/unix/mx.c
+index b5c5adf..4146409 100644
+--- a/src/osdep/unix/mx.c
++++ b/src/osdep/unix/mx.c
+@@ -1283,5 +1283,5 @@ void mx_setdate (char *file,MESSAGECACHE *elt)
+   time_t tp[2];
+   tp[0] = time (0);           /* atime is now */
+   tp[1] = mail_longdate (elt);        /* modification time */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+ }
+diff --git a/src/osdep/unix/tenex.c b/src/osdep/unix/tenex.c
+index eee61fb..622da61 100644
+--- a/src/osdep/unix/tenex.c
++++ b/src/osdep/unix/tenex.c
+@@ -203,7 +203,7 @@ int tenex_isvalid (char *name,char *tmp)
+       if (sbuf.st_ctime > sbuf.st_atime) {
+       tp[0] = sbuf.st_atime;  /* preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (file,tp);        /* set the times */
++      utime (file, (const struct utimbuf *)tp);       /* set the times */
+       }
+     }
+   }
+@@ -654,7 +654,7 @@ void tenex_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags)
+     fstat (LOCAL->fd,&sbuf);  /* get current write time */
+     tp[1] = LOCAL->filetime = sbuf.st_mtime;
+     tp[0] = time (0);         /* make sure read comes after all that */
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+ }
+
+@@ -924,7 +924,7 @@ long tenex_expunge (MAILSTREAM *stream,char *sequence,long options)
+       fstat (LOCAL->fd,&sbuf);        /* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* reset atime to now */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+       MM_NOCRITICAL (stream); /* release critical */
+                               /* notify upper level of new mailbox size */
+       mail_exists (stream,stream->nmsgs);
+@@ -1019,7 +1019,7 @@ long tenex_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   close (fd);                 /* close the file */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);     /* release critical */
+@@ -1036,7 +1036,7 @@ long tenex_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+       fstat (LOCAL->fd,&sbuf);        /* get current write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* make sure atime remains greater */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+   if (ret && mail_parameters (NIL,GET_COPYUID,NIL))
+@@ -1159,7 +1159,7 @@ long tenex_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   fclose (df);                        /* close the file */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);     /* release critical */
+@@ -1324,7 +1324,7 @@ long tenex_parse (MAILSTREAM *stream)
+     time_t tp[2];
+     tp[0] = time (0);
+     tp[1] = LOCAL->filetime;
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   stream->silent = silent;    /* can pass up events now */
+   mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */
+@@ -1424,7 +1424,7 @@ void tenex_update_status (MAILSTREAM *stream,unsigned long msgno,long syncflag)
+       fstat (LOCAL->fd,&sbuf);        /* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* make sure read is later */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+ }
+diff --git a/src/osdep/unix/unix.c b/src/osdep/unix/unix.c
+index 86be3f9..012dc83 100644
+--- a/src/osdep/unix/unix.c
++++ b/src/osdep/unix/unix.c
+@@ -232,7 +232,7 @@ DRIVER *unix_valid (char *name)
+       if ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) {
+       tp[0] = sbuf.st_atime;  /* yes, preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (file,tp);        /* set the times */
++      utime (file, (const struct utimbuf *)tp);       /* set the times */
+       }
+     }
+   }
+@@ -999,7 +999,7 @@ long unix_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+   else tp[0] =                        /* else preserve \Marked status */
+        ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) ?
+        sbuf.st_atime : tp[1];
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   unix_unlock (fd,NIL,&lock); /* unlock and close mailbox */
+   if (tstream) {              /* update last UID if we can */
+     UNIXLOCAL *local = (UNIXLOCAL *) tstream->local;
+@@ -1160,7 +1160,7 @@ long unix_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+     ret = NIL;                        /* return error */
+   }
+   else tp[0] = tp[1] - 1;     /* set atime to now-1 if successful copy */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   fclose (sf);                        /* done with scratch file */
+                               /* force UIDVALIDITY assignment now */
+   if (tstream && !tstream->uid_validity) tstream->uid_validity = time (0);
+@@ -1425,7 +1425,7 @@ void unix_unlock (int fd,MAILSTREAM *stream,DOTLOCK *lock)
+     }
+     else now = 0;             /* no time change needed */
+                               /* set the times, note change */
+-    if (now && !utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (now && !utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+   }
+   flock (fd,LOCK_UN);         /* release flock'ers */
+   if (!stream) close (fd);    /* close the file if no stream */
+@@ -2251,7 +2251,7 @@ long unix_rewrite (MAILSTREAM *stream,unsigned long *nexp,DOTLOCK *lock,
+                               /* set atime to now, mtime a second earlier */
+     tp[1] = (tp[0] = time (0)) - 1;
+                               /* set the times, note change */
+-    if (!utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (!utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+     close (LOCAL->fd);                /* close and reopen file */
+     if ((LOCAL->fd = open (stream->mailbox,O_RDWR,
+                          (long) mail_parameters (NIL,GET_MBXPROTECTION,NIL)))
meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb +1 -1
index 17faa3aa6..7e3bddb58 100644
@@ -16,6 +16,7 @@ SRC_URI = "https://fossies.org/linux/misc/old/imap-${PV}.tar.gz \
            file://0002-tmail-Include-ctype.h-for-isdigit.patch \
            file://0001-Fix-Wincompatible-function-pointer-types.patch \
            file://uw-imap-newer-tls.patch \
+           file://uw-imap-fix-incompatible-pointer-types.patch \
            "
 
 SRC_URI[md5sum] = "2126fd125ea26b73b20f01fcd5940369"
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#110750): https://lists.openembedded.org/g/openembedded-devel/message/110750
Mute This Topic: https://lists.openembedded.org/mt/106526690/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#3 lore raw

Re: [oe] [meta-oe][PATCH 2/4] uw-imap: fix compile errors of incompatible pointer type

Quoted 1 line · Khem Raj

this patch is good cleanup patch please submit it upstream as well.

It seems uw-imap project has been stalled and no upstream to submit. Other uw-imap patches have 'Pending' status too.

Regards,
Kai

Quoted 405 lines
Quoted 402 lines · Kai Kang via lists.openembedded.org

From: Kai Kang <[email protected]>

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 *}
---
  ...-imap-fix-incompatible-pointer-types.patch | 354 ++++++++++++++++++
  .../recipes-devtools/uw-imap/uw-imap_2007f.bb |   1 +
  2 files changed, 355 insertions(+)

create mode 100644 meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch

meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch new file +354 -0
new file mode 100644
index 000000000..7146fbbeb
@@ -0,0 +1,354 @@
+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 *}
+
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <[email protected]>
+
+---
+ src/osdep/unix/mbx.c       |  12 ++++++------
+ src/osdep/unix/mh.c        |   2 +-
+ src/osdep/unix/mmdf.c      |  10 +++++-----
+ src/osdep/unix/mtx.c       |  16 ++++++++--------
+ src/osdep/unix/mx.c        |   2 +-
+ src/osdep/unix/tenex.c     |  16 ++++++++--------
+ src/osdep/unix/unix.c      |  10 +++++-----
+ 7 files changed, 34 insertions(+), 34 deletions(-)
+
+diff --git a/src/osdep/unix/mbx.c b/src/osdep/unix/mbx.c
+index c8a45a5..0a587fe 100644
+--- a/src/osdep/unix/mbx.c
++++ b/src/osdep/unix/mbx.c
+@@ -302,7 +302,7 @@ int mbx_isvalid (MAILSTREAM **stream,char *name,char *tmp,int *ld,char *lock,
+     if (sbuf.st_ctime > sbuf.st_atime) {
+       tp[0] = sbuf.st_atime;  /* preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (tmp,tp);         /* set the times */
++      utime (tmp, (const struct utimbuf *)tp);                /* set the times */
+     }
+   }
+                               /* in case INBOX but not mbx format */
+@@ -776,7 +776,7 @@ void mbx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags)
+        stream->user_flags[LOCAL->ffuserflag]) || (oldpid != LOCAL->lastpid))
+       mbx_update_header (stream);
+     tp[0] = time (0);         /* make sure read comes after all that */
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   if (LOCAL->ld >= 0) {               /* unlock now */
+     unlockfd (LOCAL->ld,LOCAL->lock);
+@@ -1075,7 +1075,7 @@ long mbx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   close (fd);                 /* close the file */
+   MM_NOCRITICAL (stream);     /* release critical */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+@@ -1213,7 +1213,7 @@ long mbx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+                               /* else preserve \Marked status */
+     else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+     tp[1] = sbuf.st_mtime;    /* preserve mtime */
+-    utime (file,tp);          /* set the times */
++    utime (file, (const struct utimbuf *)tp);         /* set the times */
+     fclose (df);              /* close the file */
+     MM_NOCRITICAL (dstream);  /* release critical */
+   }
+@@ -1446,7 +1446,7 @@ long mbx_parse (MAILSTREAM *stream)
+     time_t tp[2];
+     tp[0] = time (0);
+     tp[1] = LOCAL->filetime;
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   stream->silent = silent;    /* can pass up events now */
+   mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */
+@@ -1814,7 +1814,7 @@ unsigned long mbx_rewrite (MAILSTREAM *stream,unsigned long *reclaimed,
+   fstat (LOCAL->fd,&sbuf);    /* get new write time */
+   tp[1] = LOCAL->filetime = sbuf.st_mtime;
+   tp[0] = time (0);           /* reset atime to now */
+-  utime (stream->mailbox,tp);
++  utime (stream->mailbox, (const struct utimbuf *)tp);
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+                               /* notify upper level of new mailbox size */
+   mail_exists (stream,stream->nmsgs);
+diff --git a/src/osdep/unix/mh.c b/src/osdep/unix/mh.c
+index 9264624..26f3539 100644
+--- a/src/osdep/unix/mh.c
++++ b/src/osdep/unix/mh.c
+@@ -1279,5 +1279,5 @@ void mh_setdate (char *file,MESSAGECACHE *elt)
+   time_t tp[2];
+   tp[0] = time (0);           /* atime is now */
+   tp[1] = mail_longdate (elt);        /* modification time */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+ }
+diff --git a/src/osdep/unix/mmdf.c b/src/osdep/unix/mmdf.c
+index e962434..c0adbee 100644
+--- a/src/osdep/unix/mmdf.c
++++ b/src/osdep/unix/mmdf.c
+@@ -379,7 +379,7 @@ long mmdf_isvalid (char *name,char *tmp)
+       if ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) {
+       tp[0] = sbuf.st_atime;  /* preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (file,tp);        /* set the times */
++      utime (file, (const struct utimbuf *)tp);       /* set the times */
+       }
+     }
+   }
+@@ -1131,7 +1131,7 @@ long mmdf_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+   else tp[0] =                        /* else preserve \Marked status */
+        ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) ?
+        sbuf.st_atime : tp[1];
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   mmdf_unlock (fd,NIL,&lock); /* unlock and close mailbox */
+   if (tstream) {              /* update last UID if we can */
+     MMDFLOCAL *local = (MMDFLOCAL *) tstream->local;
+@@ -1292,7 +1292,7 @@ long mmdf_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+     ret = NIL;                        /* return error */
+   }
+   else tp[0] = tp[1] - 1;     /* set atime to now-1 if successful copy */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   fclose (sf);                        /* done with scratch file */
+                               /* force UIDVALIDITY assignment now */
+   if (tstream && !tstream->uid_validity) tstream->uid_validity = time (0);
+@@ -1550,7 +1550,7 @@ void mmdf_unlock (int fd,MAILSTREAM *stream,DOTLOCK *lock)
+     }
+     else now = 0;             /* no time change needed */
+                               /* set the times, note change */
+-    if (now && !utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (now && !utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+   }
+   flock (fd,LOCK_UN);         /* release flock'ers */
+   if (!stream) close (fd);    /* close the file if no stream */
+@@ -2393,7 +2393,7 @@ long mmdf_rewrite (MAILSTREAM *stream,unsigned long *nexp,DOTLOCK *lock,
+                               /* set atime to now, mtime a second earlier */
+     tp[1] = (tp[0] = time (0)) - 1;
+                               /* set the times, note change */
+-    if (!utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (!utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+     close (LOCAL->fd);                /* close and reopen file */
+     if ((LOCAL->fd = open (stream->mailbox,O_RDWR,
+                          (long) mail_parameters (NIL,GET_MBXPROTECTION,NIL)))
+diff --git a/src/osdep/unix/mtx.c b/src/osdep/unix/mtx.c
+index 8e6f76e..f64142b 100644
+--- a/src/osdep/unix/mtx.c
++++ b/src/osdep/unix/mtx.c
+@@ -196,7 +196,7 @@ int mtx_isvalid (char *name,char *tmp)
+       if (sbuf.st_ctime > sbuf.st_atime) {
+       tp[0] = sbuf.st_atime;  /* preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (file,tp);        /* set the times */
++      utime (file, (const struct utimbuf *)tp);       /* set the times */
+       }
+     }
+   }
+@@ -565,7 +565,7 @@ void mtx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags)
+     fstat (LOCAL->fd,&sbuf);  /* get current write time */
+     tp[1] = LOCAL->filetime = sbuf.st_mtime;
+     tp[0] = time (0);         /* make sure read comes after all that */
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+ }
+
+@@ -834,7 +834,7 @@ long mtx_expunge (MAILSTREAM *stream,char *sequence,long options)
+       fstat (LOCAL->fd,&sbuf);        /* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* reset atime to now */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+       MM_NOCRITICAL (stream); /* release critical */
+                               /* notify upper level of new mailbox size */
+       mail_exists (stream,stream->nmsgs);
+@@ -929,7 +929,7 @@ long mtx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   close (fd);                 /* close the file */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);     /* release critical */
+@@ -946,7 +946,7 @@ long mtx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+       fstat (LOCAL->fd,&sbuf);        /* get current write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* make sure atime remains greater */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+   if (ret && mail_parameters (NIL,GET_COPYUID,NIL))
+@@ -1062,7 +1062,7 @@ long mtx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   fclose (df);                        /* close the file */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);     /* release critical */
+@@ -1212,7 +1212,7 @@ long mtx_parse (MAILSTREAM *stream)
+     time_t tp[2];
+     tp[0] = time (0);
+     tp[1] = LOCAL->filetime;
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   stream->silent = silent;    /* can pass up events now */
+   mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */
+@@ -1312,7 +1312,7 @@ void mtx_update_status (MAILSTREAM *stream,unsigned long msgno,long syncflag)
+       fstat (LOCAL->fd,&sbuf);        /* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* make sure read is later */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+ }
+diff --git a/src/osdep/unix/mx.c b/src/osdep/unix/mx.c
+index b5c5adf..4146409 100644
+--- a/src/osdep/unix/mx.c
++++ b/src/osdep/unix/mx.c
+@@ -1283,5 +1283,5 @@ void mx_setdate (char *file,MESSAGECACHE *elt)
+   time_t tp[2];
+   tp[0] = time (0);           /* atime is now */
+   tp[1] = mail_longdate (elt);        /* modification time */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+ }
+diff --git a/src/osdep/unix/tenex.c b/src/osdep/unix/tenex.c
+index eee61fb..622da61 100644
+--- a/src/osdep/unix/tenex.c
++++ b/src/osdep/unix/tenex.c
+@@ -203,7 +203,7 @@ int tenex_isvalid (char *name,char *tmp)
+       if (sbuf.st_ctime > sbuf.st_atime) {
+       tp[0] = sbuf.st_atime;  /* preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (file,tp);        /* set the times */
++      utime (file, (const struct utimbuf *)tp);       /* set the times */
+       }
+     }
+   }
+@@ -654,7 +654,7 @@ void tenex_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags)
+     fstat (LOCAL->fd,&sbuf);  /* get current write time */
+     tp[1] = LOCAL->filetime = sbuf.st_mtime;
+     tp[0] = time (0);         /* make sure read comes after all that */
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+ }
+
+@@ -924,7 +924,7 @@ long tenex_expunge (MAILSTREAM *stream,char *sequence,long options)
+       fstat (LOCAL->fd,&sbuf);        /* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* reset atime to now */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+       MM_NOCRITICAL (stream); /* release critical */
+                               /* notify upper level of new mailbox size */
+       mail_exists (stream,stream->nmsgs);
+@@ -1019,7 +1019,7 @@ long tenex_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   close (fd);                 /* close the file */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);     /* release critical */
+@@ -1036,7 +1036,7 @@ long tenex_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+       fstat (LOCAL->fd,&sbuf);        /* get current write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* make sure atime remains greater */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+   if (ret && mail_parameters (NIL,GET_COPYUID,NIL))
+@@ -1159,7 +1159,7 @@ long tenex_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   fclose (df);                        /* close the file */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);     /* release critical */
+@@ -1324,7 +1324,7 @@ long tenex_parse (MAILSTREAM *stream)
+     time_t tp[2];
+     tp[0] = time (0);
+     tp[1] = LOCAL->filetime;
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   stream->silent = silent;    /* can pass up events now */
+   mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */
+@@ -1424,7 +1424,7 @@ void tenex_update_status (MAILSTREAM *stream,unsigned long msgno,long syncflag)
+       fstat (LOCAL->fd,&sbuf);        /* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* make sure read is later */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+ }
+diff --git a/src/osdep/unix/unix.c b/src/osdep/unix/unix.c
+index 86be3f9..012dc83 100644
+--- a/src/osdep/unix/unix.c
++++ b/src/osdep/unix/unix.c
+@@ -232,7 +232,7 @@ DRIVER *unix_valid (char *name)
+       if ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) {
+       tp[0] = sbuf.st_atime;  /* yes, preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (file,tp);        /* set the times */
++      utime (file, (const struct utimbuf *)tp);       /* set the times */
+       }
+     }
+   }
+@@ -999,7 +999,7 @@ long unix_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+   else tp[0] =                        /* else preserve \Marked status */
+        ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) ?
+        sbuf.st_atime : tp[1];
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   unix_unlock (fd,NIL,&lock); /* unlock and close mailbox */
+   if (tstream) {              /* update last UID if we can */
+     UNIXLOCAL *local = (UNIXLOCAL *) tstream->local;
+@@ -1160,7 +1160,7 @@ long unix_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+     ret = NIL;                        /* return error */
+   }
+   else tp[0] = tp[1] - 1;     /* set atime to now-1 if successful copy */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   fclose (sf);                        /* done with scratch file */
+                               /* force UIDVALIDITY assignment now */
+   if (tstream && !tstream->uid_validity) tstream->uid_validity = time (0);
+@@ -1425,7 +1425,7 @@ void unix_unlock (int fd,MAILSTREAM *stream,DOTLOCK *lock)
+     }
+     else now = 0;             /* no time change needed */
+                               /* set the times, note change */
+-    if (now && !utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (now && !utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+   }
+   flock (fd,LOCK_UN);         /* release flock'ers */
+   if (!stream) close (fd);    /* close the file if no stream */
+@@ -2251,7 +2251,7 @@ long unix_rewrite (MAILSTREAM *stream,unsigned long *nexp,DOTLOCK *lock,
+                               /* set atime to now, mtime a second earlier */
+     tp[1] = (tp[0] = time (0)) - 1;
+                               /* set the times, note change */
+-    if (!utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (!utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+     close (LOCAL->fd);                /* close and reopen file */
+     if ((LOCAL->fd = open (stream->mailbox,O_RDWR,
+                          (long) mail_parameters (NIL,GET_MBXPROTECTION,NIL)))
meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb +1 -1
index 17faa3aa6..7e3bddb58 100644
@@ -16,6 +16,7 @@ SRC_URI = "https://fossies.org/linux/misc/old/imap-${PV}.tar.gz \
             file://0002-tmail-Include-ctype.h-for-isdigit.patch \
             file://0001-Fix-Wincompatible-function-pointer-types.patch \
             file://uw-imap-newer-tls.patch \
+           file://uw-imap-fix-incompatible-pointer-types.patch \
             "
 
  SRC_URI[md5sum] = "2126fd125ea26b73b20f01fcd5940369"
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#110750): https://lists.openembedded.org/g/openembedded-devel/message/110750
Mute This Topic: https://lists.openembedded.org/mt/106526690/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 2 lines
Kai Kang
Wind River Linux
#4 lore raw

Re: [oe] [meta-oe][PATCH 2/4] uw-imap: fix compile errors of incompatible pointer type

Quoted 8 lines · Kai
Quoted 1 line · Khem Raj

this patch is good cleanup patch please submit it upstream as well.

It seems uw-imap project has been stalled and no upstream to submit. Other uw-imap
patches have 'Pending' status too.

Thanks, in that case update the upstream status ro reflect Inappropriate [Upstream dead] or something pending means it should be send upstream at some point.

Quoted 413 lines

Regards,
Kai

Quoted 397 lines
Quoted 394 lines · Kai Kang via lists.openembedded.org

From: Kai Kang <[email protected]>

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 *}
---
  ...-imap-fix-incompatible-pointer-types.patch | 354 ++++++++++++++++++
  .../recipes-devtools/uw-imap/uw-imap_2007f.bb |   1 +
  2 files changed, 355 insertions(+)

create mode 100644 meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch

meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch new file +354 -0
new file mode 100644
index 000000000..7146fbbeb
@@ -0,0 +1,354 @@
+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 *}
+
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <[email protected]>
+
+---
+ src/osdep/unix/mbx.c       |  12 ++++++------
+ src/osdep/unix/mh.c        |   2 +-
+ src/osdep/unix/mmdf.c      |  10 +++++-----
+ src/osdep/unix/mtx.c       |  16 ++++++++--------
+ src/osdep/unix/mx.c        |   2 +-
+ src/osdep/unix/tenex.c     |  16 ++++++++--------
+ src/osdep/unix/unix.c      |  10 +++++-----
+ 7 files changed, 34 insertions(+), 34 deletions(-)
+
+diff --git a/src/osdep/unix/mbx.c b/src/osdep/unix/mbx.c
+index c8a45a5..0a587fe 100644
+--- a/src/osdep/unix/mbx.c
++++ b/src/osdep/unix/mbx.c
+@@ -302,7 +302,7 @@ int mbx_isvalid (MAILSTREAM **stream,char *name,char *tmp,int *ld,char *lock,
+     if (sbuf.st_ctime > sbuf.st_atime) {
+       tp[0] = sbuf.st_atime;  /* preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (tmp,tp);         /* set the times */
++      utime (tmp, (const struct utimbuf *)tp);                /* set the times */
+     }
+   }
+                               /* in case INBOX but not mbx format */
+@@ -776,7 +776,7 @@ void mbx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags)
+        stream->user_flags[LOCAL->ffuserflag]) || (oldpid != LOCAL->lastpid))
+       mbx_update_header (stream);
+     tp[0] = time (0);         /* make sure read comes after all that */
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   if (LOCAL->ld >= 0) {               /* unlock now */
+     unlockfd (LOCAL->ld,LOCAL->lock);
+@@ -1075,7 +1075,7 @@ long mbx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   close (fd);                 /* close the file */
+   MM_NOCRITICAL (stream);     /* release critical */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+@@ -1213,7 +1213,7 @@ long mbx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+                               /* else preserve \Marked status */
+     else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+     tp[1] = sbuf.st_mtime;    /* preserve mtime */
+-    utime (file,tp);          /* set the times */
++    utime (file, (const struct utimbuf *)tp);         /* set the times */
+     fclose (df);              /* close the file */
+     MM_NOCRITICAL (dstream);  /* release critical */
+   }
+@@ -1446,7 +1446,7 @@ long mbx_parse (MAILSTREAM *stream)
+     time_t tp[2];
+     tp[0] = time (0);
+     tp[1] = LOCAL->filetime;
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   stream->silent = silent;    /* can pass up events now */
+   mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */
+@@ -1814,7 +1814,7 @@ unsigned long mbx_rewrite (MAILSTREAM *stream,unsigned long *reclaimed,
+   fstat (LOCAL->fd,&sbuf);    /* get new write time */
+   tp[1] = LOCAL->filetime = sbuf.st_mtime;
+   tp[0] = time (0);           /* reset atime to now */
+-  utime (stream->mailbox,tp);
++  utime (stream->mailbox, (const struct utimbuf *)tp);
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+                               /* notify upper level of new mailbox size */
+   mail_exists (stream,stream->nmsgs);
+diff --git a/src/osdep/unix/mh.c b/src/osdep/unix/mh.c
+index 9264624..26f3539 100644
+--- a/src/osdep/unix/mh.c
++++ b/src/osdep/unix/mh.c
+@@ -1279,5 +1279,5 @@ void mh_setdate (char *file,MESSAGECACHE *elt)
+   time_t tp[2];
+   tp[0] = time (0);           /* atime is now */
+   tp[1] = mail_longdate (elt);        /* modification time */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+ }
+diff --git a/src/osdep/unix/mmdf.c b/src/osdep/unix/mmdf.c
+index e962434..c0adbee 100644
+--- a/src/osdep/unix/mmdf.c
++++ b/src/osdep/unix/mmdf.c
+@@ -379,7 +379,7 @@ long mmdf_isvalid (char *name,char *tmp)
+       if ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) {
+       tp[0] = sbuf.st_atime;  /* preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (file,tp);        /* set the times */
++      utime (file, (const struct utimbuf *)tp);       /* set the times */
+       }
+     }
+   }
+@@ -1131,7 +1131,7 @@ long mmdf_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+   else tp[0] =                        /* else preserve \Marked status */
+        ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) ?
+        sbuf.st_atime : tp[1];
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   mmdf_unlock (fd,NIL,&lock); /* unlock and close mailbox */
+   if (tstream) {              /* update last UID if we can */
+     MMDFLOCAL *local = (MMDFLOCAL *) tstream->local;
+@@ -1292,7 +1292,7 @@ long mmdf_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+     ret = NIL;                        /* return error */
+   }
+   else tp[0] = tp[1] - 1;     /* set atime to now-1 if successful copy */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   fclose (sf);                        /* done with scratch file */
+                               /* force UIDVALIDITY assignment now */
+   if (tstream && !tstream->uid_validity) tstream->uid_validity = time (0);
+@@ -1550,7 +1550,7 @@ void mmdf_unlock (int fd,MAILSTREAM *stream,DOTLOCK *lock)
+     }
+     else now = 0;             /* no time change needed */
+                               /* set the times, note change */
+-    if (now && !utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (now && !utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+   }
+   flock (fd,LOCK_UN);         /* release flock'ers */
+   if (!stream) close (fd);    /* close the file if no stream */
+@@ -2393,7 +2393,7 @@ long mmdf_rewrite (MAILSTREAM *stream,unsigned long *nexp,DOTLOCK *lock,
+                               /* set atime to now, mtime a second earlier */
+     tp[1] = (tp[0] = time (0)) - 1;
+                               /* set the times, note change */
+-    if (!utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (!utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+     close (LOCAL->fd);                /* close and reopen file */
+     if ((LOCAL->fd = open (stream->mailbox,O_RDWR,
+                          (long) mail_parameters (NIL,GET_MBXPROTECTION,NIL)))
+diff --git a/src/osdep/unix/mtx.c b/src/osdep/unix/mtx.c
+index 8e6f76e..f64142b 100644
+--- a/src/osdep/unix/mtx.c
++++ b/src/osdep/unix/mtx.c
+@@ -196,7 +196,7 @@ int mtx_isvalid (char *name,char *tmp)
+       if (sbuf.st_ctime > sbuf.st_atime) {
+       tp[0] = sbuf.st_atime;  /* preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (file,tp);        /* set the times */
++      utime (file, (const struct utimbuf *)tp);       /* set the times */
+       }
+     }
+   }
+@@ -565,7 +565,7 @@ void mtx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags)
+     fstat (LOCAL->fd,&sbuf);  /* get current write time */
+     tp[1] = LOCAL->filetime = sbuf.st_mtime;
+     tp[0] = time (0);         /* make sure read comes after all that */
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+ }
+
+@@ -834,7 +834,7 @@ long mtx_expunge (MAILSTREAM *stream,char *sequence,long options)
+       fstat (LOCAL->fd,&sbuf);        /* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* reset atime to now */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+       MM_NOCRITICAL (stream); /* release critical */
+                               /* notify upper level of new mailbox size */
+       mail_exists (stream,stream->nmsgs);
+@@ -929,7 +929,7 @@ long mtx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   close (fd);                 /* close the file */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);     /* release critical */
+@@ -946,7 +946,7 @@ long mtx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+       fstat (LOCAL->fd,&sbuf);        /* get current write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* make sure atime remains greater */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+   if (ret && mail_parameters (NIL,GET_COPYUID,NIL))
+@@ -1062,7 +1062,7 @@ long mtx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   fclose (df);                        /* close the file */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);     /* release critical */
+@@ -1212,7 +1212,7 @@ long mtx_parse (MAILSTREAM *stream)
+     time_t tp[2];
+     tp[0] = time (0);
+     tp[1] = LOCAL->filetime;
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   stream->silent = silent;    /* can pass up events now */
+   mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */
+@@ -1312,7 +1312,7 @@ void mtx_update_status (MAILSTREAM *stream,unsigned long msgno,long syncflag)
+       fstat (LOCAL->fd,&sbuf);        /* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* make sure read is later */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+ }
+diff --git a/src/osdep/unix/mx.c b/src/osdep/unix/mx.c
+index b5c5adf..4146409 100644
+--- a/src/osdep/unix/mx.c
++++ b/src/osdep/unix/mx.c
+@@ -1283,5 +1283,5 @@ void mx_setdate (char *file,MESSAGECACHE *elt)
+   time_t tp[2];
+   tp[0] = time (0);           /* atime is now */
+   tp[1] = mail_longdate (elt);        /* modification time */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+ }
+diff --git a/src/osdep/unix/tenex.c b/src/osdep/unix/tenex.c
+index eee61fb..622da61 100644
+--- a/src/osdep/unix/tenex.c
++++ b/src/osdep/unix/tenex.c
+@@ -203,7 +203,7 @@ int tenex_isvalid (char *name,char *tmp)
+       if (sbuf.st_ctime > sbuf.st_atime) {
+       tp[0] = sbuf.st_atime;  /* preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (file,tp);        /* set the times */
++      utime (file, (const struct utimbuf *)tp);       /* set the times */
+       }
+     }
+   }
+@@ -654,7 +654,7 @@ void tenex_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags)
+     fstat (LOCAL->fd,&sbuf);  /* get current write time */
+     tp[1] = LOCAL->filetime = sbuf.st_mtime;
+     tp[0] = time (0);         /* make sure read comes after all that */
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+ }
+
+@@ -924,7 +924,7 @@ long tenex_expunge (MAILSTREAM *stream,char *sequence,long options)
+       fstat (LOCAL->fd,&sbuf);        /* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* reset atime to now */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+       MM_NOCRITICAL (stream); /* release critical */
+                               /* notify upper level of new mailbox size */
+       mail_exists (stream,stream->nmsgs);
+@@ -1019,7 +1019,7 @@ long tenex_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   close (fd);                 /* close the file */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);     /* release critical */
+@@ -1036,7 +1036,7 @@ long tenex_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+       fstat (LOCAL->fd,&sbuf);        /* get current write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* make sure atime remains greater */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+   if (ret && mail_parameters (NIL,GET_COPYUID,NIL))
+@@ -1159,7 +1159,7 @@ long tenex_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   fclose (df);                        /* close the file */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);     /* release critical */
+@@ -1324,7 +1324,7 @@ long tenex_parse (MAILSTREAM *stream)
+     time_t tp[2];
+     tp[0] = time (0);
+     tp[1] = LOCAL->filetime;
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   stream->silent = silent;    /* can pass up events now */
+   mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */
+@@ -1424,7 +1424,7 @@ void tenex_update_status (MAILSTREAM *stream,unsigned long msgno,long syncflag)
+       fstat (LOCAL->fd,&sbuf);        /* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* make sure read is later */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+ }
+diff --git a/src/osdep/unix/unix.c b/src/osdep/unix/unix.c
+index 86be3f9..012dc83 100644
+--- a/src/osdep/unix/unix.c
++++ b/src/osdep/unix/unix.c
+@@ -232,7 +232,7 @@ DRIVER *unix_valid (char *name)
+       if ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) {
+       tp[0] = sbuf.st_atime;  /* yes, preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (file,tp);        /* set the times */
++      utime (file, (const struct utimbuf *)tp);       /* set the times */
+       }
+     }
+   }
+@@ -999,7 +999,7 @@ long unix_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+   else tp[0] =                        /* else preserve \Marked status */
+        ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) ?
+        sbuf.st_atime : tp[1];
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   unix_unlock (fd,NIL,&lock); /* unlock and close mailbox */
+   if (tstream) {              /* update last UID if we can */
+     UNIXLOCAL *local = (UNIXLOCAL *) tstream->local;
+@@ -1160,7 +1160,7 @@ long unix_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+     ret = NIL;                        /* return error */
+   }
+   else tp[0] = tp[1] - 1;     /* set atime to now-1 if successful copy */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   fclose (sf);                        /* done with scratch file */
+                               /* force UIDVALIDITY assignment now */
+   if (tstream && !tstream->uid_validity) tstream->uid_validity = time (0);
+@@ -1425,7 +1425,7 @@ void unix_unlock (int fd,MAILSTREAM *stream,DOTLOCK *lock)
+     }
+     else now = 0;             /* no time change needed */
+                               /* set the times, note change */
+-    if (now && !utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (now && !utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+   }
+   flock (fd,LOCK_UN);         /* release flock'ers */
+   if (!stream) close (fd);    /* close the file if no stream */
+@@ -2251,7 +2251,7 @@ long unix_rewrite (MAILSTREAM *stream,unsigned long *nexp,DOTLOCK *lock,
+                               /* set atime to now, mtime a second earlier */
+     tp[1] = (tp[0] = time (0)) - 1;
+                               /* set the times, note change */
+-    if (!utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (!utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+     close (LOCAL->fd);                /* close and reopen file */
+     if ((LOCAL->fd = open (stream->mailbox,O_RDWR,
+                          (long) mail_parameters (NIL,GET_MBXPROTECTION,NIL)))
meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb +1 -1
index 17faa3aa6..7e3bddb58 100644
@@ -16,6 +16,7 @@ SRC_URI = "https://fossies.org/linux/misc/old/imap-${PV}.tar.gz \
             file://0002-tmail-Include-ctype.h-for-isdigit.patch \
             file://0001-Fix-Wincompatible-function-pointer-types.patch \
             file://uw-imap-newer-tls.patch \
+           file://uw-imap-fix-incompatible-pointer-types.patch \
             "
 
  SRC_URI[md5sum] = "2126fd125ea26b73b20f01fcd5940369"
--

2.34.1

Quoted 8 lines
Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#110750): https://lists.openembedded.org/g/openembedded-devel/message/110750
Mute This Topic: https://lists.openembedded.org/mt/106526690/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

--
Kai Kang
Wind River Linux

author
#5 lore raw

Re: [oe] [meta-oe][PATCH 2/4] uw-imap: fix compile errors of incompatible pointer type

Quoted 10 lines · Khem Raj
Quoted 6 lines · Kai
Quoted 1 line · Khem Raj

this patch is good cleanup patch please submit it upstream as well.

It seems uw-imap project has been stalled and no upstream to submit. Other uw-imap
patches have 'Pending' status too.

Thanks, in that case update the upstream status ro reflect Inappropriate [Upstream dead] or something pending means it should be send upstream at some point.

OK. v2 will be sent.

Regards,
Kai

Quoted 412 lines
Quoted 412 lines

Regards,
Kai

Quoted 396 lines
Quoted 394 lines · Kai Kang via lists.openembedded.org

From: Kai Kang <[email protected]>

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 *}
---
   ...-imap-fix-incompatible-pointer-types.patch | 354 ++++++++++++++++++
   .../recipes-devtools/uw-imap/uw-imap_2007f.bb |   1 +
   2 files changed, 355 insertions(+)

create mode 100644 meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch

meta-oe/recipes-devtools/uw-imap/uw-imap/uw-imap-fix-incompatible-pointer-types.patch new file +354 -0
new file mode 100644
index 000000000..7146fbbeb
@@ -0,0 +1,354 @@
+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 *}
+
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <[email protected]>
+
+---
+ src/osdep/unix/mbx.c       |  12 ++++++------
+ src/osdep/unix/mh.c        |   2 +-
+ src/osdep/unix/mmdf.c      |  10 +++++-----
+ src/osdep/unix/mtx.c       |  16 ++++++++--------
+ src/osdep/unix/mx.c        |   2 +-
+ src/osdep/unix/tenex.c     |  16 ++++++++--------
+ src/osdep/unix/unix.c      |  10 +++++-----
+ 7 files changed, 34 insertions(+), 34 deletions(-)
+
+diff --git a/src/osdep/unix/mbx.c b/src/osdep/unix/mbx.c
+index c8a45a5..0a587fe 100644
+--- a/src/osdep/unix/mbx.c
++++ b/src/osdep/unix/mbx.c
+@@ -302,7 +302,7 @@ int mbx_isvalid (MAILSTREAM **stream,char *name,char *tmp,int *ld,char *lock,
+     if (sbuf.st_ctime > sbuf.st_atime) {
+       tp[0] = sbuf.st_atime;  /* preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (tmp,tp);         /* set the times */
++      utime (tmp, (const struct utimbuf *)tp);                /* set the times */
+     }
+   }
+                               /* in case INBOX but not mbx format */
+@@ -776,7 +776,7 @@ void mbx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags)
+        stream->user_flags[LOCAL->ffuserflag]) || (oldpid != LOCAL->lastpid))
+       mbx_update_header (stream);
+     tp[0] = time (0);         /* make sure read comes after all that */
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   if (LOCAL->ld >= 0) {               /* unlock now */
+     unlockfd (LOCAL->ld,LOCAL->lock);
+@@ -1075,7 +1075,7 @@ long mbx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   close (fd);                 /* close the file */
+   MM_NOCRITICAL (stream);     /* release critical */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+@@ -1213,7 +1213,7 @@ long mbx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+                               /* else preserve \Marked status */
+     else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+     tp[1] = sbuf.st_mtime;    /* preserve mtime */
+-    utime (file,tp);          /* set the times */
++    utime (file, (const struct utimbuf *)tp);         /* set the times */
+     fclose (df);              /* close the file */
+     MM_NOCRITICAL (dstream);  /* release critical */
+   }
+@@ -1446,7 +1446,7 @@ long mbx_parse (MAILSTREAM *stream)
+     time_t tp[2];
+     tp[0] = time (0);
+     tp[1] = LOCAL->filetime;
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   stream->silent = silent;    /* can pass up events now */
+   mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */
+@@ -1814,7 +1814,7 @@ unsigned long mbx_rewrite (MAILSTREAM *stream,unsigned long *reclaimed,
+   fstat (LOCAL->fd,&sbuf);    /* get new write time */
+   tp[1] = LOCAL->filetime = sbuf.st_mtime;
+   tp[0] = time (0);           /* reset atime to now */
+-  utime (stream->mailbox,tp);
++  utime (stream->mailbox, (const struct utimbuf *)tp);
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+                               /* notify upper level of new mailbox size */
+   mail_exists (stream,stream->nmsgs);
+diff --git a/src/osdep/unix/mh.c b/src/osdep/unix/mh.c
+index 9264624..26f3539 100644
+--- a/src/osdep/unix/mh.c
++++ b/src/osdep/unix/mh.c
+@@ -1279,5 +1279,5 @@ void mh_setdate (char *file,MESSAGECACHE *elt)
+   time_t tp[2];
+   tp[0] = time (0);           /* atime is now */
+   tp[1] = mail_longdate (elt);        /* modification time */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+ }
+diff --git a/src/osdep/unix/mmdf.c b/src/osdep/unix/mmdf.c
+index e962434..c0adbee 100644
+--- a/src/osdep/unix/mmdf.c
++++ b/src/osdep/unix/mmdf.c
+@@ -379,7 +379,7 @@ long mmdf_isvalid (char *name,char *tmp)
+       if ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) {
+       tp[0] = sbuf.st_atime;  /* preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (file,tp);        /* set the times */
++      utime (file, (const struct utimbuf *)tp);       /* set the times */
+       }
+     }
+   }
+@@ -1131,7 +1131,7 @@ long mmdf_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+   else tp[0] =                        /* else preserve \Marked status */
+        ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) ?
+        sbuf.st_atime : tp[1];
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   mmdf_unlock (fd,NIL,&lock); /* unlock and close mailbox */
+   if (tstream) {              /* update last UID if we can */
+     MMDFLOCAL *local = (MMDFLOCAL *) tstream->local;
+@@ -1292,7 +1292,7 @@ long mmdf_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+     ret = NIL;                        /* return error */
+   }
+   else tp[0] = tp[1] - 1;     /* set atime to now-1 if successful copy */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   fclose (sf);                        /* done with scratch file */
+                               /* force UIDVALIDITY assignment now */
+   if (tstream && !tstream->uid_validity) tstream->uid_validity = time (0);
+@@ -1550,7 +1550,7 @@ void mmdf_unlock (int fd,MAILSTREAM *stream,DOTLOCK *lock)
+     }
+     else now = 0;             /* no time change needed */
+                               /* set the times, note change */
+-    if (now && !utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (now && !utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+   }
+   flock (fd,LOCK_UN);         /* release flock'ers */
+   if (!stream) close (fd);    /* close the file if no stream */
+@@ -2393,7 +2393,7 @@ long mmdf_rewrite (MAILSTREAM *stream,unsigned long *nexp,DOTLOCK *lock,
+                               /* set atime to now, mtime a second earlier */
+     tp[1] = (tp[0] = time (0)) - 1;
+                               /* set the times, note change */
+-    if (!utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (!utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+     close (LOCAL->fd);                /* close and reopen file */
+     if ((LOCAL->fd = open (stream->mailbox,O_RDWR,
+                          (long) mail_parameters (NIL,GET_MBXPROTECTION,NIL)))
+diff --git a/src/osdep/unix/mtx.c b/src/osdep/unix/mtx.c
+index 8e6f76e..f64142b 100644
+--- a/src/osdep/unix/mtx.c
++++ b/src/osdep/unix/mtx.c
+@@ -196,7 +196,7 @@ int mtx_isvalid (char *name,char *tmp)
+       if (sbuf.st_ctime > sbuf.st_atime) {
+       tp[0] = sbuf.st_atime;  /* preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (file,tp);        /* set the times */
++      utime (file, (const struct utimbuf *)tp);       /* set the times */
+       }
+     }
+   }
+@@ -565,7 +565,7 @@ void mtx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags)
+     fstat (LOCAL->fd,&sbuf);  /* get current write time */
+     tp[1] = LOCAL->filetime = sbuf.st_mtime;
+     tp[0] = time (0);         /* make sure read comes after all that */
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+ }
+
+@@ -834,7 +834,7 @@ long mtx_expunge (MAILSTREAM *stream,char *sequence,long options)
+       fstat (LOCAL->fd,&sbuf);        /* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* reset atime to now */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+       MM_NOCRITICAL (stream); /* release critical */
+                               /* notify upper level of new mailbox size */
+       mail_exists (stream,stream->nmsgs);
+@@ -929,7 +929,7 @@ long mtx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   close (fd);                 /* close the file */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);     /* release critical */
+@@ -946,7 +946,7 @@ long mtx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+       fstat (LOCAL->fd,&sbuf);        /* get current write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* make sure atime remains greater */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+   if (ret && mail_parameters (NIL,GET_COPYUID,NIL))
+@@ -1062,7 +1062,7 @@ long mtx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   fclose (df);                        /* close the file */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);     /* release critical */
+@@ -1212,7 +1212,7 @@ long mtx_parse (MAILSTREAM *stream)
+     time_t tp[2];
+     tp[0] = time (0);
+     tp[1] = LOCAL->filetime;
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   stream->silent = silent;    /* can pass up events now */
+   mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */
+@@ -1312,7 +1312,7 @@ void mtx_update_status (MAILSTREAM *stream,unsigned long msgno,long syncflag)
+       fstat (LOCAL->fd,&sbuf);        /* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* make sure read is later */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+ }
+diff --git a/src/osdep/unix/mx.c b/src/osdep/unix/mx.c
+index b5c5adf..4146409 100644
+--- a/src/osdep/unix/mx.c
++++ b/src/osdep/unix/mx.c
+@@ -1283,5 +1283,5 @@ void mx_setdate (char *file,MESSAGECACHE *elt)
+   time_t tp[2];
+   tp[0] = time (0);           /* atime is now */
+   tp[1] = mail_longdate (elt);        /* modification time */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+ }
+diff --git a/src/osdep/unix/tenex.c b/src/osdep/unix/tenex.c
+index eee61fb..622da61 100644
+--- a/src/osdep/unix/tenex.c
++++ b/src/osdep/unix/tenex.c
+@@ -203,7 +203,7 @@ int tenex_isvalid (char *name,char *tmp)
+       if (sbuf.st_ctime > sbuf.st_atime) {
+       tp[0] = sbuf.st_atime;  /* preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (file,tp);        /* set the times */
++      utime (file, (const struct utimbuf *)tp);       /* set the times */
+       }
+     }
+   }
+@@ -654,7 +654,7 @@ void tenex_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags)
+     fstat (LOCAL->fd,&sbuf);  /* get current write time */
+     tp[1] = LOCAL->filetime = sbuf.st_mtime;
+     tp[0] = time (0);         /* make sure read comes after all that */
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+ }
+
+@@ -924,7 +924,7 @@ long tenex_expunge (MAILSTREAM *stream,char *sequence,long options)
+       fstat (LOCAL->fd,&sbuf);        /* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* reset atime to now */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+       MM_NOCRITICAL (stream); /* release critical */
+                               /* notify upper level of new mailbox size */
+       mail_exists (stream,stream->nmsgs);
+@@ -1019,7 +1019,7 @@ long tenex_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   close (fd);                 /* close the file */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);     /* release critical */
+@@ -1036,7 +1036,7 @@ long tenex_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+       fstat (LOCAL->fd,&sbuf);        /* get current write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* make sure atime remains greater */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+   if (ret && mail_parameters (NIL,GET_COPYUID,NIL))
+@@ -1159,7 +1159,7 @@ long tenex_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+                               /* else preserve \Marked status */
+   else tp[0] = (sbuf.st_ctime > sbuf.st_atime) ? sbuf.st_atime : time(0);
+   tp[1] = sbuf.st_mtime;      /* preserve mtime */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   fclose (df);                        /* close the file */
+   unlockfd (ld,lock);         /* release exclusive parse/append permission */
+   MM_NOCRITICAL (stream);     /* release critical */
+@@ -1324,7 +1324,7 @@ long tenex_parse (MAILSTREAM *stream)
+     time_t tp[2];
+     tp[0] = time (0);
+     tp[1] = LOCAL->filetime;
+-    utime (stream->mailbox,tp);
++    utime (stream->mailbox, (const struct utimbuf *)tp);
+   }
+   stream->silent = silent;    /* can pass up events now */
+   mail_exists (stream,nmsgs); /* notify upper level of new mailbox size */
+@@ -1424,7 +1424,7 @@ void tenex_update_status (MAILSTREAM *stream,unsigned long msgno,long syncflag)
+       fstat (LOCAL->fd,&sbuf);        /* get new write time */
+       tp[1] = LOCAL->filetime = sbuf.st_mtime;
+       tp[0] = time (0);               /* make sure read is later */
+-      utime (stream->mailbox,tp);
++      utime (stream->mailbox, (const struct utimbuf *)tp);
+     }
+   }
+ }
+diff --git a/src/osdep/unix/unix.c b/src/osdep/unix/unix.c
+index 86be3f9..012dc83 100644
+--- a/src/osdep/unix/unix.c
++++ b/src/osdep/unix/unix.c
+@@ -232,7 +232,7 @@ DRIVER *unix_valid (char *name)
+       if ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) {
+       tp[0] = sbuf.st_atime;  /* yes, preserve atime and mtime */
+       tp[1] = sbuf.st_mtime;
+-      utime (file,tp);        /* set the times */
++      utime (file, (const struct utimbuf *)tp);       /* set the times */
+       }
+     }
+   }
+@@ -999,7 +999,7 @@ long unix_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options)
+   else tp[0] =                        /* else preserve \Marked status */
+        ((sbuf.st_ctime > sbuf.st_atime) || (sbuf.st_mtime > sbuf.st_atime)) ?
+        sbuf.st_atime : tp[1];
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   unix_unlock (fd,NIL,&lock); /* unlock and close mailbox */
+   if (tstream) {              /* update last UID if we can */
+     UNIXLOCAL *local = (UNIXLOCAL *) tstream->local;
+@@ -1160,7 +1160,7 @@ long unix_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
+     ret = NIL;                        /* return error */
+   }
+   else tp[0] = tp[1] - 1;     /* set atime to now-1 if successful copy */
+-  utime (file,tp);            /* set the times */
++  utime (file, (const struct utimbuf *)tp);           /* set the times */
+   fclose (sf);                        /* done with scratch file */
+                               /* force UIDVALIDITY assignment now */
+   if (tstream && !tstream->uid_validity) tstream->uid_validity = time (0);
+@@ -1425,7 +1425,7 @@ void unix_unlock (int fd,MAILSTREAM *stream,DOTLOCK *lock)
+     }
+     else now = 0;             /* no time change needed */
+                               /* set the times, note change */
+-    if (now && !utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (now && !utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+   }
+   flock (fd,LOCK_UN);         /* release flock'ers */
+   if (!stream) close (fd);    /* close the file if no stream */
+@@ -2251,7 +2251,7 @@ long unix_rewrite (MAILSTREAM *stream,unsigned long *nexp,DOTLOCK *lock,
+                               /* set atime to now, mtime a second earlier */
+     tp[1] = (tp[0] = time (0)) - 1;
+                               /* set the times, note change */
+-    if (!utime (stream->mailbox,tp)) LOCAL->filetime = tp[1];
++    if (!utime (stream->mailbox, (const struct utimbuf *)tp)) LOCAL->filetime = tp[1];
+     close (LOCAL->fd);                /* close and reopen file */
+     if ((LOCAL->fd = open (stream->mailbox,O_RDWR,
+                          (long) mail_parameters (NIL,GET_MBXPROTECTION,NIL)))
meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb +1 -1
index 17faa3aa6..7e3bddb58 100644
@@ -16,6 +16,7 @@ SRC_URI = "https://fossies.org/linux/misc/old/imap-${PV}.tar.gz \
              file://0002-tmail-Include-ctype.h-for-isdigit.patch \
              file://0001-Fix-Wincompatible-function-pointer-types.patch \
              file://uw-imap-newer-tls.patch \
+           file://uw-imap-fix-incompatible-pointer-types.patch \
              "
 
   SRC_URI[md5sum] = "2126fd125ea26b73b20f01fcd5940369"
--

2.34.1

Quoted 8 lines
Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#110750): https://lists.openembedded.org/g/openembedded-devel/message/110750
Mute This Topic: https://lists.openembedded.org/mt/106526690/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

--
Kai Kang
Wind River Linux

Signature · 2 lines
Kai Kang
Wind River Linux
#6 lore raw

PATCH 3/4 recipes: disable gcc option -Wincompatible-pointer-types

In reply to [email protected]

From: Kai Kang <[email protected]>

It fails to run do_compile tasks for libdbd-mysql-perl and rrdtool with gcc option -Wincompatible-pointer-types enabled by default. Disable it as workaround.

---
 meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb | 2 ++
 meta-oe/recipes-extended/rrdtool/rrdtool_1.8.0.bb        | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb +2 -0
index fc505fe1e..919997914 100644
@@ -20,3 +20,5 @@ SRC_URI = "git://github.com/perl5-dbi/DBD-mysql.git;protocol=https;branch=master
 S = "${WORKDIR}/git"
 
 inherit cpan
+
+EXTRA_OEMAKE = ' CC="${CC} -Wno-incompatible-pointer-types"'
meta-oe/recipes-extended/rrdtool/rrdtool_1.8.0.bb +1 -1
index cbe1af285..32ab911bc 100644
@@ -59,7 +59,7 @@ export STAGING_LIBDIR
 export STAGING_INCDIR
 
 # emulate cpan_do_configure
-EXTRA_OEMAKE = ' PERL5LIB="${PERL_ARCHLIB}" '
+EXTRA_OEMAKE = ' CC="${CC} -Wno-incompatible-pointer-types" PERL5LIB="${PERL_ARCHLIB}" '
 # Avoid do_configure error on some hosts
 
 do_configure() {
Signature · 1 line
2.34.1
#7 lore raw

PATCH 4/4 daq: fix incompatible pointer type error

In reply to [email protected]

From: Kai Kang <[email protected]>

Fix incompatible pointer type error for daq:

| ../../daq-2.0.7/os-daq-modules/daq_nfq.c: In function 'SetPktHdr':
| ../../daq-2.0.7/os-daq-modules/daq_nfq.c:394:37: error: passing argument 2 of 'nfq_get_payload' from incompatible pointer type [-Wincompatible-pointer-types]
|   394 |     int len = nfq_get_payload(nfad, (char**)pkt);
|       |                                     ^~~~~~~~~~~
|       |                                     |
|       |                                     char **
---
 .../recipes-connectivity/daq/daq_2.0.7.bb     |  1 +
 ...-fix-incompatible-pointer-type-error.patch | 30 +++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch
meta-networking/recipes-connectivity/daq/daq_2.0.7.bb +1 -0
index 66ad83f71..8cb4c04fa 100644
@@ -11,6 +11,7 @@ DEPENDS = "libpcap libpcre libdnet bison-native libnetfilter-queue"
 SRC_URI = "http://fossies.org/linux/misc/daq-${PV}.tar.gz \
            file://disable-run-test-program-while-cross-compiling.patch \
            file://0001-correct-the-location-of-unistd.h.patch \
+           file://daq-fix-incompatible-pointer-type-error.patch \
            "
 SRC_URI[sha256sum] = "bdc4e5a24d1ea492c39ee213a63c55466a2e8114b6a9abed609927ae13a7705e"
 # these 2 create undeclared dependency on libdnet and libnetfilter-queue from meta-networking
meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch new file +30 -0
new file mode 100644
index 000000000..5a02d1615
@@ -0,0 +1,30 @@
+Fix daq incompatible pointer type error:
+
+| ../../daq-2.0.7/os-daq-modules/daq_nfq.c: In function 'SetPktHdr':                                                                                                                                                                          
+| ../../daq-2.0.7/os-daq-modules/daq_nfq.c:394:37: error: passing argument 2 of 'nfq_get_payload' from incompatible pointer type [-Wincompatible-pointer-types]
+|   394 |     int len = nfq_get_payload(nfad, (char**)pkt); 
+|       |                                     ^~~~~~~~~~~
+|       |                                     |                                                                                                                                                                                               
+|       |                                     char **
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <[email protected]>
+
+---
+ os-daq-modules/daq_nfq.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/os-daq-modules/daq_nfq.c b/os-daq-modules/daq_nfq.c
+index 4de94b6..a6de2f3 100644
+--- a/os-daq-modules/daq_nfq.c
++++ b/os-daq-modules/daq_nfq.c
+@@ -391,7 +391,7 @@ static inline int SetPktHdr (
+     DAQ_PktHdr_t* hdr,
+     uint8_t** pkt
+ ) {
+-    int len = nfq_get_payload(nfad, (char**)pkt);
++    int len = nfq_get_payload(nfad, (unsigned char**)pkt);
+ 
+     if ( len <= 0 )
+         return -1;
Signature · 1 line
2.34.1
#8 lore raw

Re: [oe] [meta-networking][PATCH 4/4] daq: fix incompatible pointer type error

Quoted 38 lines · Kai Kang via lists.openembedded.org

From: Kai Kang <[email protected]>

Fix incompatible pointer type error for daq:

| ../../daq-2.0.7/os-daq-modules/daq_nfq.c: In function 'SetPktHdr':
| ../../daq-2.0.7/os-daq-modules/daq_nfq.c:394:37: error: passing argument 2 of 'nfq_get_payload' from incompatible pointer type [-Wincompatible-pointer-types]
|   394 |     int len = nfq_get_payload(nfad, (char**)pkt);
|       |                                     ^~~~~~~~~~~
|       |                                     |
|       |                                     char **
---
 .../recipes-connectivity/daq/daq_2.0.7.bb     |  1 +
 ...-fix-incompatible-pointer-type-error.patch | 30 +++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch
meta-networking/recipes-connectivity/daq/daq_2.0.7.bb +1 -0
index 66ad83f71..8cb4c04fa 100644
@@ -11,6 +11,7 @@ DEPENDS = "libpcap libpcre libdnet bison-native libnetfilter-queue"
 SRC_URI = "http://fossies.org/linux/misc/daq-${PV}.tar.gz \
            file://disable-run-test-program-while-cross-compiling.patch \
            file://0001-correct-the-location-of-unistd.h.patch \
+           file://daq-fix-incompatible-pointer-type-error.patch \
            "
 SRC_URI[sha256sum] = "bdc4e5a24d1ea492c39ee213a63c55466a2e8114b6a9abed609927ae13a7705e"
 # these 2 create undeclared dependency on libdnet and libnetfilter-queue from meta-networking
meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch new file +1 -0
new file mode 100644
index 000000000..5a02d1615
@@ -0,0 +1,30 @@
+Fix daq incompatible pointer type error:

meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch line 11

Quoted 10 lines
meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch new file +10 -0
+
+| ../../daq-2.0.7/os-daq-modules/daq_nfq.c: In function 'SetPktHdr':
+| ../../daq-2.0.7/os-daq-modules/daq_nfq.c:394:37: error: passing argument 2 of 'nfq_get_payload' from incompatible pointer type [-Wincompatible-pointer-types]
+|   394 |     int len = nfq_get_payload(nfad, (char**)pkt);
+|       |                                     ^~~~~~~~~~~
+|       |                                     |
+|       |                                     char **
+
+Upstream-Status: Pending
+

please submit upstream as well

Quoted 31 lines
meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch new file +19 -1
+Signed-off-by: Kai Kang <[email protected]>
+
+---
+ os-daq-modules/daq_nfq.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/os-daq-modules/daq_nfq.c b/os-daq-modules/daq_nfq.c
+index 4de94b6..a6de2f3 100644
+--- a/os-daq-modules/daq_nfq.c
++++ b/os-daq-modules/daq_nfq.c
+@@ -391,7 +391,7 @@ static inline int SetPktHdr (
+     DAQ_PktHdr_t* hdr,
+     uint8_t** pkt
+ ) {
+-    int len = nfq_get_payload(nfad, (char**)pkt);
++    int len = nfq_get_payload(nfad, (unsigned char**)pkt);
+
+     if ( len <= 0 )
+         return -1;
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#110752): https://lists.openembedded.org/g/openembedded-devel/message/110752
Mute This Topic: https://lists.openembedded.org/mt/106526692/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#9 lore raw

Re: [oe] [meta-networking][PATCH 4/4] daq: fix incompatible pointer type error

Quoted 42 lines · Khem Raj
Quoted 40 lines · Kai Kang via lists.openembedded.org

From: Kai Kang <[email protected]>

Fix incompatible pointer type error for daq:

| ../../daq-2.0.7/os-daq-modules/daq_nfq.c: In function 'SetPktHdr':
| ../../daq-2.0.7/os-daq-modules/daq_nfq.c:394:37: error: passing argument 2 of 'nfq_get_payload' from incompatible pointer type [-Wincompatible-pointer-types]
|   394 |     int len = nfq_get_payload(nfad, (char**)pkt);
|       |                                     ^~~~~~~~~~~
|       |                                     |
|       |                                     char **
---
  .../recipes-connectivity/daq/daq_2.0.7.bb     |  1 +
  ...-fix-incompatible-pointer-type-error.patch | 30 +++++++++++++++++++
  2 files changed, 31 insertions(+)

create mode 100644 meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch

meta-networking/recipes-connectivity/daq/daq_2.0.7.bb +1 -0
index 66ad83f71..8cb4c04fa 100644
@@ -11,6 +11,7 @@ DEPENDS = "libpcap libpcre libdnet bison-native libnetfilter-queue"
  SRC_URI = "http://fossies.org/linux/misc/daq-${PV}.tar.gz \
             file://disable-run-test-program-while-cross-compiling.patch \
             file://0001-correct-the-location-of-unistd.h.patch \
+           file://daq-fix-incompatible-pointer-type-error.patch \
             "
  SRC_URI[sha256sum] = "bdc4e5a24d1ea492c39ee213a63c55466a2e8114b6a9abed609927ae13a7705e"
  # these 2 create undeclared dependency on libdnet and libnetfilter-queue from meta-networking
meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch new file +4 -0
new file mode 100644
index 000000000..5a02d1615
@@ -0,0 +1,30 @@
+Fix daq incompatible pointer type error:
+
+| ../../daq-2.0.7/os-daq-modules/daq_nfq.c: In function 'SetPktHdr':
+| ../../daq-2.0.7/os-daq-modules/daq_nfq.c:394:37: error: passing argument 2 of 'nfq_get_payload' from incompatible pointer type [-Wincompatible-pointer-types]
Quoted 8 lines

meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch line 11

Quoted 7 lines
meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch new file +7 -0
+|   394 |     int len = nfq_get_payload(nfad, (char**)pkt);
+|       |                                     ^~~~~~~~~~~
+|       |                                     |
+|       |                                     char **
+
+Upstream-Status: Pending
+

please submit upstream as well

It seems daq belongs to snort2 which I don't find any git repo for it. There are git repos of snort3 on github but none for snort2.

Regards,
Kai

Quoted 32 lines
Quoted 32 lines
meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch new file +19 -1
+Signed-off-by: Kai Kang <[email protected]>
+
+---
+ os-daq-modules/daq_nfq.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/os-daq-modules/daq_nfq.c b/os-daq-modules/daq_nfq.c
+index 4de94b6..a6de2f3 100644
+--- a/os-daq-modules/daq_nfq.c
++++ b/os-daq-modules/daq_nfq.c
+@@ -391,7 +391,7 @@ static inline int SetPktHdr (
+     DAQ_PktHdr_t* hdr,
+     uint8_t** pkt
+ ) {
+-    int len = nfq_get_payload(nfad, (char**)pkt);
++    int len = nfq_get_payload(nfad, (unsigned char**)pkt);
+
+     if ( len <= 0 )
+         return -1;
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#110752): https://lists.openembedded.org/g/openembedded-devel/message/110752
Mute This Topic: https://lists.openembedded.org/mt/106526692/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 2 lines
Kai Kang
Wind River Linux