Skip to content

Commit

Permalink
net/ipsvd: fix pkg-fallout with LLVM15
Browse files Browse the repository at this point in the history
./compile udpsvd.c
udpsvd.c:271:32: error: incompatible pointer to integer conversion passing 'gid_t[61]' (aka 'unsigned int[61]') to parameter of type 'unsigned long' [-Wint-conversion]
      bufnum[fmt_ulong(bufnum, ugid.gid)] =0;
                               ^~~~~~~~
and use ugid.gid[0], and -include unistd.h globally, to fix
several missing prototype warnings around execve.

Someone tell Gerrit Pape that this code needs some serious fixing
around type widths and prototypes.

Deprecate, unless the upstream fixes things, and expire end of 2023.
  • Loading branch information
mandree committed May 5, 2023
1 parent 5c07244 commit 8d05626
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
7 changes: 6 additions & 1 deletion net/ipsvd/Makefile
@@ -1,5 +1,6 @@
PORTNAME= ipsvd
PORTVERSION= 1.0.0
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://smarden.org/ipsvd/

Expand All @@ -18,12 +19,16 @@ BROKEN_riscv64= fails to install: Checking udpsvd... drop: unable to read from
WRKSRC= ${WRKDIR}/net/${DISTNAME}
ALL_TARGET= default

DEPRECATED= bogus assumption of system type widths, likely crash-prone
EXPIRATION_DATE=2023-12-31

DOCS= package/CHANGES package/COPYING package/README doc/*.html

OPTIONS_DEFINE= DOCS
USE_CSTD= c89

do-configure:
@${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/src/conf-cc
@${ECHO_CMD} "${CC} ${CFLAGS} -include unistd.h" > ${WRKSRC}/src/conf-cc
@${ECHO_CMD} "${CC} ${LDFLAGS}" > ${WRKSRC}/src/conf-ld
@${ECHO_CMD} "${LOCALBASE}/include/libdjbdns" \
> ${WRKSRC}/src/conf-djbdnsinc
Expand Down
11 changes: 11 additions & 0 deletions net/ipsvd/files/patch-src_udpsvd.c
@@ -0,0 +1,11 @@
--- src/udpsvd.c.orig 2008-06-15 20:31:14 UTC
+++ src/udpsvd.c
@@ -268,7 +268,7 @@ int main(int argc, const char **argv, const char *cons
if (user) {
bufnum[fmt_ulong(bufnum, ugid.uid)] =0;
out(", uid "); out(bufnum);
- bufnum[fmt_ulong(bufnum, ugid.gid)] =0;
+ bufnum[fmt_ulong(bufnum, ugid.gid[0])] =0;
out(", gid "); out(bufnum);
}
flush(", starting.\n");

0 comments on commit 8d05626

Please sign in to comment.