[med-svn] [Git][med-team/ctn][master] 3 commits: d/rules: cap C standard to 2017.
Étienne Mollier (@emollier)
gitlab at salsa.debian.org
Mon Sep 15 21:35:52 BST 2025
Étienne Mollier pushed to branch master at Debian Med / ctn
Commits:
2c7d51eb by Étienne Mollier at 2025-09-15T22:26:47+02:00
d/rules: cap C standard to 2017.
This avoids having to go through a refactoring of the numerous
function callbacks that would be better done on upstream side,
upstream which has been inactive for 17 years so far. This
contributes to resolving release critical bug #1096489, but it won't
suffice on its own.
- - - - -
ab4e06fb by Étienne Mollier at 2025-09-15T22:33:26+02:00
gcc-15.patch: PARTIAL: fix ftbfs with gcc-15.
The aim is to close #1096489, but this patch is unfinished, because it
is still necessary to fix the following build failure, and possibly
many more:
flex lex.l
mv lex.yy.c lex.c
gcc -g -DDEBUG -DLITTLE_ENDIAN_ARCHITECTURE -DLINUX -DSHARED_MEMORY -DSEMAPHORE -DX11 -DATHENA -DX11R4 -DUSLEEP -DMYSQLDB -I/build/reproducible-path/ctn-3.2.0~dfsg/include -I/usr/include/mysql -I/usr/include/Xm -I/usr/X11R6/include -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/ctn-3.2.0~dfsg=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wno-error=incompatible-pointer-types -Wno-error=implicit-int -Wno-error=int-conversion -std=c17 -DLONGSIZE=64 -DINTSIZE=32 -DSHORTSIZE=16 -DTIMEOFDAYARGS=2 -DMOTIF -DUSEREGCOMP -I/build/reproducible-path/ctn-3.2.0~dfsg/include -Wdate-time -D_FORTIFY_SOURCE=2 -c -o lex.o lex.c
lex.l: In function ‘yylex’:
lex.l:75:32: warning: format ‘%x’ expects argument of type ‘unsigned int *’, but argument 3 has type ‘long unsigned int *’ [-Wformat=]
75 | sscanf(yytext, "%x", &yylval.num);
| ^~~~ ~~~~~~~~~~~
| |
| long unsigned int *
lex.yy.c: In function ‘yy_init_buffer’:
lex.yy.c:1466:48: error: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration]
- - - - -
988b1772 by Étienne Mollier at 2025-09-15T22:35:22+02:00
d/changelog: initialise the changelog.
- - - - -
4 changed files:
- debian/changelog
- + debian/patches/gcc-15.patch
- debian/patches/series
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+ctn (3.2.0~dfsg-9) UNRELEASED; urgency=medium
+
+ * Team upload.
+ * d/rules: cap C standard to 2017.
+ * gcc-15.patch: PARTIAL: fix ftbfs with gcc-15.
+ TODO:The aim is to close #1096489, but this patch is unfinished.
+
+ -- Étienne Mollier <emollier at debian.org> Mon, 15 Sep 2025 22:34:18 +0200
+
ctn (3.2.0~dfsg-8) unstable; urgency=medium
* Team upload.
=====================================
debian/patches/gcc-15.patch
=====================================
@@ -0,0 +1,216 @@
+Description: fix ftbfs with gcc-15
+ This patch fixes a huge number of missing function definitions that
+ dropped after bump to gcc-15. This patch does not account for C
+ standard 2023, given that such changes would also involve refactoring
+ dozens of function callbacks, which would be better done upstream,
+ except that upstream hasn't seen any activity for the past 17 years.
+Author: Étienne Mollier <emollier at debian.org>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1096489
+Forwarded: no
+Last-Update: 2025-09-15
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- ctn.orig/facilities/dulprotocol/dulprotocol.c
++++ ctn/facilities/dulprotocol/dulprotocol.c
+@@ -62,6 +62,12 @@
+
+ static char rcsid[] = "$Revision: 1.58 $ $RCSfile: dulprotocol.c,v $";
+
++/* Workaround missing usleep. */
++#ifdef LINUX
++#define _DEFAULT_SOURCE
++#include <unistd.h>
++#endif
++
+ #include "ctn_os.h"
+
+ #include "dicom.h"
+@@ -160,9 +166,6 @@
+ int port;
+ struct sockaddr_in server;
+ struct hostent *hp;
+-#ifndef _MSC_VER
+- struct hostent *gethostbyname();
+-#endif
+ CTN_SOCKET sck;
+
+ struct linger sockarg;
+@@ -199,8 +202,8 @@
+ return COND_PushCondition(DUL_UNKNOWNHOST,
+ DUL_Message(DUL_UNKNOWNHOST), node);
+ }
+- (void) memcpy(&server.sin_addr, hp->h_addr, (unsigned long) hp->h_length);
+- server.sin_port = (u_short) htons(port);
++ (void) memcpy(&server.sin_addr, hp->h_addr_list[0], (unsigned long) hp->h_length);
++ server.sin_port = (unsigned short) htons(port);
+
+ /*fprintf(stderr, "Socket is %d:\n", *s);*/
+ if (connect(*s, (struct sockaddr *) & server, sizeof(server)) < 0) {
+@@ -1584,6 +1587,7 @@
+ ** Algorithm:
+ ** Description of the algorithm (optional) and any other notes.
+ */
++#include <unistd.h>
+
+ CONDITION
+ DUL_AcknowledgeRelease(DUL_ASSOCIATIONKEY ** callerAssociation)
+@@ -1603,7 +1607,7 @@
+ if (!CTN_SUCCESS(cond))
+ return cond;
+ #ifdef LINUX
+- usleep(100000);
++ usleep((useconds_t)100000);
+ #endif
+ cond = PRV_StateMachine(NULL, association,
+ ARTIM_TIMER_EXPIRED, (*association)->protocolState, NULL);
+@@ -2419,7 +2423,7 @@
+ /* Name socket using wildcards */
+ server.sin_family = AF_INET;
+ server.sin_addr.s_addr = INADDR_ANY;
+- server.sin_port = (u_short) htons((*key)->networkSpecific.TCP.port);
++ server.sin_port = (unsigned short) htons((*key)->networkSpecific.TCP.port);
+ if (bind((*key)->networkSpecific.TCP.listenSocket,
+ (struct sockaddr *) & server, sizeof(server))) {
+ return COND_PushCondition(DUL_TCPINITERROR,
+--- ctn.orig/facilities/snp/snp.c
++++ ctn/facilities/snp/snp.c
+@@ -70,6 +70,7 @@
+ #include "dicom.h"
+ #include "condition.h"
+ #include "lst.h"
++#include "decode.h"
+ #include "snp.h"
+
+ #ifdef SNOOP
+@@ -81,7 +82,6 @@
+ #include <sys/pfmod.h>
+
+
+-#include "decode.h"
+
+
+ /* Structure of state message vector */
+--- ctn.orig/facilities/dulprotocol/dulsnoop.c
++++ ctn/facilities/dulprotocol/dulsnoop.c
+@@ -83,6 +83,7 @@
+ #include "lst.h"
+ #include "condition.h"
+ #include "dicom_uids.h"
++#include "decode.h"
+ #include "snp.h"
+ #include "dulprotocol.h"
+ #include "dulfsm.h"
+--- ctn.orig/facilities/fis/event.c
++++ ctn/facilities/fis/event.c
+@@ -49,6 +49,9 @@
+
+ static char rcsid[] = "$Revision: 1.12 $ $RCSfile: event.c,v $";
+
++#define _DEFAULT_SOURCE
++#include <unistd.h>
++
+ #include "ctn_os.h"
+
+ #if 0
+--- ctn.orig/apps/ctnnetwork/ctnnetwork.c
++++ ctn/apps/ctnnetwork/ctnnetwork.c
+@@ -48,6 +48,9 @@
+
+ static char rcsid[] = "$Revision: 1.26 $ $RCSfile: ctnnetwork.c,v $";
+
++#define _DEFAULT_SOURCE
++#include <unistd.h>
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <math.h>
+--- ctn.orig/apps/dcm_create_object/create.h
++++ ctn/apps/dcm_create_object/create.h
+@@ -19,6 +19,7 @@
+ #ifndef _CREATE_H_
+ #define _CREATE_H_
+
++#define _POSIX_C_SOURCE 200809L
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+--- ctn.orig/apps/dcm_modify_object/modify.h
++++ ctn/apps/dcm_modify_object/modify.h
+@@ -16,6 +16,7 @@
+ ** Status: $State: Exp $
+ */
+
++#define _POSIX_C_SOURCE 200809L
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+--- ctn.orig/apps/dcm_modify_object/gram.y
++++ ctn/apps/dcm_modify_object/gram.y
+@@ -18,6 +18,7 @@
+ */
+
+ static char rcsid[] = "$Revision: 1.7 $ $RCSfile: gram.y,v $";
++#define _POSIX_C_SOURCE 200809L
+ #include "modify.h" /* common declarations */
+ CONDITION
+ cond; /* status code returned by DICOM facilities */
+--- ctn.orig/apps/dcm_create_object/gram.y
++++ ctn/apps/dcm_create_object/gram.y
+@@ -18,6 +18,7 @@
+ */
+
+ static char rcsid[] = "$Revision: 1.10 $ $RCSfile: gram.y,v $";
++#define _POSIX_C_SOURCE 200809L
+ #include "create.h" /* common declarations */
+ CONDITION
+ cond; /* status code returned by DICOM facilities */
+--- ctn.orig/apps/dcm_create_object/gram_mod.c
++++ ctn/apps/dcm_create_object/gram_mod.c
+@@ -2,6 +2,7 @@
+ static char const
+ yyrcsid[] = "$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.28 2000/01/17 02:04:06 bde Exp $";
+ #endif
++#define _POSIX_C_SOURCE 200809L
+ #include <stdlib.h>
+ #define YYBYACC 1
+ #define YYMAJOR 1
+--- ctn.orig/apps/dcm_modify_object/gram_mod.c
++++ ctn/apps/dcm_modify_object/gram_mod.c
+@@ -19,6 +19,7 @@
+ */
+
+ static char rcsid[] = "$Revision: 1.1 $ $RCSfile: gram_mod.c,v $";
++#define _POSIX_C_SOURCE 200809L
+ #include "modify.h" /* common declarations */
+ CONDITION
+ cond; /* status code returned by DICOM facilities */
+--- ctn.orig/apps/dcm_create_object/lex_mod.c
++++ ctn/apps/dcm_create_object/lex_mod.c
+@@ -4,6 +4,7 @@
+ * $Header: /home/smm/ctn/ctn/apps/dcm_create_object/lex_mod.c,v 1.3 2004-09-09 14:45:31 smm Exp $
+ */
+
++#define _POSIX_C_SOURCE 200809L
+ #define FLEX_SCANNER
+ #define YY_FLEX_MAJOR_VERSION 2
+ #define YY_FLEX_MINOR_VERSION 5
+--- ctn.orig/apps/dcm_modify_object/lex_mod.c
++++ ctn/apps/dcm_modify_object/lex_mod.c
+@@ -4,6 +4,7 @@
+ * $Header: /home/smm/ctn/ctn/apps/dcm_modify_object/lex_mod.c,v 1.1 1997-10-15 15:05:39 smm Exp $
+ */
+
++#define _POSIX_C_SOURCE 200809L
+ #define FLEX_SCANNER
+ #define YY_FLEX_MAJOR_VERSION 2
+ #define YY_FLEX_MINOR_VERSION 5
+--- ctn.orig/apps/dcm_modify_object/lex.l
++++ ctn/apps/dcm_modify_object/lex.l
+@@ -18,6 +18,7 @@
+ */
+
+ static char rcsid[] = "$Revision: 1.6 $ $RCSfile: lex.l,v $";
++#define _POSIX_C_SOURCE 200809L
+ #include <stdio.h>
+ #include "modify.h"
+ #include "gram.h"
=====================================
debian/patches/series
=====================================
@@ -7,3 +7,4 @@
50_clang_FTBFS_Wreturn-type.patch
mayhem.patch
fix-implicit-function-declaration.patch
+gcc-15.patch
=====================================
debian/rules
=====================================
@@ -10,7 +10,8 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = \
-Wno-error=incompatible-pointer-types \
-Wno-error=implicit-int \
- -Wno-error=int-conversion
+ -Wno-error=int-conversion \
+ -std=c17
pkg-ctn := ctn
pkg-ctn-dev := ctn-dev
View it on GitLab: https://salsa.debian.org/med-team/ctn/-/compare/177f43ca8e2c08e3df4b9e859deef487f6e4a1fb...988b177230de957afd897ee3e2a11bcf239a40b6
--
View it on GitLab: https://salsa.debian.org/med-team/ctn/-/compare/177f43ca8e2c08e3df4b9e859deef487f6e4a1fb...988b177230de957afd897ee3e2a11bcf239a40b6
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20250915/b5183262/attachment-0001.htm>
More information about the debian-med-commit
mailing list