Hi!

On Fri, 2024-05-03 at 12:42:19 +0200, Guillem Jover wrote:
> Control: tag -1 patch

> On Wed, 2024-03-13 at 12:50:29 +0100, Lucas Nussbaum wrote:
> > Source: geki2
> > Version: 2.0.3-10
> > Severity: serious
> > Justification: FTBFS
> > Tags: trixie sid ftbfs
> > User: lu...@debian.org
> > Usertags: ftbfs-20240313 ftbfs-trixie ftbfs-impfuncdef
> 
> > During a rebuild of all packages in sid, your package failed to build
> > on amd64.
> > 
> > This is most likely caused by a change in dpkg 1.22.6, that enabled
> > -Werror=implicit-function-declaration. For more information, see
> > https://wiki.debian.org/qa.debian.org/FTBFS#A2024-03-13_-Werror.3Dimplicit-function-declaration
> > 
> > Relevant part (hopefully):
> > > gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" 
> > > -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"geki2-KXL\" 
> > > -DVERSION=\"2.0.3\" -DHAVE_LIBKXL=1 -DHAVE_LIBKXL=1 -DHAVE_SYS_TYPES_H=1 
> > > -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
> > > -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 
> > > -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1 
> > > -DDATA_PATH=\"/usr/share/games/geki2/data\" 
> > > -DBMP_PATH=\"/usr/share/games/geki2/bmp\" 
> > > -DWAV_PATH=\"/usr/share/games/geki2/wav\" -DTITLE=\"geki2-KXL\ 2.0.3\"  
> > > -I. -I.   -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 
> > > -Werror=implicit-function-declaration 
> > > -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong 
> > > -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection 
> > > -c misc.c
> > > misc.c: In function ‘ClearAndGameOver’:
> > > misc.c:127:7: error: implicit declaration of function ‘ScoreRanking’ 
> > > [-Werror=implicit-function-declaration]
> > >   127 |       ScoreRanking();
> > >       |       ^~~~~~~~~~~~
> > > misc.c:132:5: error: implicit declaration of function ‘UnLoadStageData’; 
> > > did you mean ‘LoadStageData’? [-Werror=implicit-function-declaration]
> > >   132 |     UnLoadStageData();
> > >       |     ^~~~~~~~~~~~~~~
> > >       |     LoadStageData
> > > cc1: some warnings being treated as errors
> > > make[2]: *** [Makefile:233: misc.o] Error 1
> 
> The attached debdiff patch should fix the build.

Actually, the attached debdiff should be better (properly split
patches).

Thanks,
Guillem
diff -Nru geki2-2.0.3/debian/patches/020_headers.diff 
geki2-2.0.3/debian/patches/020_headers.diff
--- geki2-2.0.3/debian/patches/020_headers.diff 2018-05-13 16:22:49.000000000 
+0200
+++ geki2-2.0.3/debian/patches/020_headers.diff 2024-05-03 13:00:11.000000000 
+0200
@@ -4,29 +4,25 @@
 
 ===================================================================
 ---
- src/geki2.h   | 1 +
- src/ranking.c | 1 +
- 2 files changed, 2 insertions(+)
+ src/geki2.h   |    3 +++
+ src/load.c    |    2 +-
+ src/load.h    |    1 +
+ src/ranking.c |    1 +
+ src/ranking.h |    2 +-
+ 5 files changed, 7 insertions(+), 2 deletions(-)
 
-diff --git a/src/geki2.h b/src/geki2.h
-index 938d760..b293afb 100644
 --- a/src/geki2.h
 +++ b/src/geki2.h
-@@ -9,6 +9,7 @@
+@@ -7,9 +7,12 @@
+ #ifndef _GEKI2_H_
+ #define _GEKI2_H_
  
++#include <string.h>
  #include <stdio.h>
  #include <stdlib.h>
 +#include <inttypes.h>
  #include <sys/types.h>
++#include <time.h>
  #include <unistd.h>
  #include <KXL.h>
-diff --git a/src/ranking.c b/src/ranking.c
-index a6683c5..4e3df6c 100644
---- a/src/ranking.c
-+++ b/src/ranking.c
-@@ -1,4 +1,5 @@
- #include <pwd.h>
-+#include <string.h>
- #include "geki2.h"
- #include "extern.h"
  
diff -Nru geki2-2.0.3/debian/patches/020_implicit-decl.patch 
geki2-2.0.3/debian/patches/020_implicit-decl.patch
--- geki2-2.0.3/debian/patches/020_implicit-decl.patch  1970-01-01 
01:00:00.000000000 +0100
+++ geki2-2.0.3/debian/patches/020_implicit-decl.patch  2024-05-03 
12:59:08.000000000 +0200
@@ -0,0 +1,47 @@
+Description: And and fix function declarations
+ With the compiler now dafeaulting to -Werror=implicit-function-declaration,
+ we need to properly declare all functions in the relevant headers.
+Author: Guillem Jover <guil...@hadrons.org>
+Origin: vendor
+Forwarded: no
+
+===================================================================
+---
+ src/geki2.h   |    3 +++
+ src/load.c    |    2 +-
+ src/load.h    |    1 +
+ src/ranking.c |    1 +
+ src/ranking.h |    2 +-
+ 5 files changed, 7 insertions(+), 2 deletions(-)
+
+--- a/src/load.c
++++ b/src/load.c
+@@ -237,7 +237,7 @@ void LoadStageData(void)
+ /**********************
+   ���ơ����ǡ������
+  **********************/
+-void UnLoadStageData()
++void UnLoadStageData(void)
+ {
+   Uint8 bossmax[] = {2, 3 * 2, 1 * 2, 1 * 2, 1 * 2, 1 * 2};
+   Uint8 backmax[] = {7, 16, 20, 8, 18, 15};
+--- a/src/load.h
++++ b/src/load.h
+@@ -9,5 +9,6 @@ void UnLoadPixmaps(PixData **my, int max
+ void CreatePixmap(void);
+ void DeletePixmap(void);
+ void LoadStageData(void);
++void UnLoadStageData(void);
+ 
+ #endif
+--- a/src/ranking.h
++++ b/src/ranking.h
+@@ -1,7 +1,7 @@
+ #ifndef _RANKING_H_
+ #define _RANKING_H_
+ 
+-void RankingScore(void);
++int ScoreRanking(void);
+ void ReadScore(void);
+ void WriteScore(void);
+ 
diff -Nru geki2-2.0.3/debian/patches/020_scanf.diff 
geki2-2.0.3/debian/patches/020_scanf.diff
--- geki2-2.0.3/debian/patches/020_scanf.diff   2018-05-13 16:22:49.000000000 
+0200
+++ geki2-2.0.3/debian/patches/020_scanf.diff   2024-05-03 13:03:10.000000000 
+0200
@@ -4,12 +4,10 @@
 
 ===================================================================
 ---
- src/load.c    | 2 +-
- src/ranking.c | 4 ++--
+ src/load.c    |    2 +-
+ src/ranking.c |    4 ++--
  2 files changed, 3 insertions(+), 3 deletions(-)
 
-diff --git a/src/load.c b/src/load.c
-index e771eca..284ed8f 100644
 --- a/src/load.c
 +++ b/src/load.c
 @@ -216,7 +216,7 @@ void LoadStageData(void)
@@ -21,11 +19,9 @@
             &(StageDatas[Root->StageMax]->Time),
             &(StageDatas[Root->StageMax]->CreateNo),
             &(StageDatas[Root->StageMax]->Max),
-diff --git a/src/ranking.c b/src/ranking.c
-index 4e3df6c..2ed04af 100644
 --- a/src/ranking.c
 +++ b/src/ranking.c
-@@ -39,9 +39,9 @@ void ReadScore(void)
+@@ -38,9 +38,9 @@ void ReadScore(void)
    Uint16 i;
  
    if ((fp = fopen(DATA_PATH "/.score", "r"))) {
diff -Nru geki2-2.0.3/debian/patches/020_score_path.diff 
geki2-2.0.3/debian/patches/020_score_path.diff
--- geki2-2.0.3/debian/patches/020_score_path.diff      2018-05-13 
16:22:49.000000000 +0200
+++ geki2-2.0.3/debian/patches/020_score_path.diff      2024-05-03 
13:03:13.000000000 +0200
@@ -4,14 +4,12 @@
 
 ===================================================================
 ---
- src/ranking.c | 4 ++--
+ src/ranking.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/src/ranking.c b/src/ranking.c
-index 2ed04af..fe3f4fc 100644
 --- a/src/ranking.c
 +++ b/src/ranking.c
-@@ -38,7 +38,7 @@ void ReadScore(void)
+@@ -37,7 +37,7 @@ void ReadScore(void)
    FILE *fp;
    Uint16 i;
  
@@ -20,7 +18,7 @@
      fscanf(fp, "%"SCNu32, &(Root->HiScore));
      for (i = 0; i < 5; i ++)
        fscanf(fp, "%"SCNu32" %"SCNu8" %"SCNu8" %s",
-@@ -70,7 +70,7 @@ void WriteScore(void)
+@@ -69,7 +69,7 @@ void WriteScore(void)
    FILE *fp;
    Uint16 i;
  
diff -Nru geki2-2.0.3/debian/patches/020_shot_keys.diff 
geki2-2.0.3/debian/patches/020_shot_keys.diff
--- geki2-2.0.3/debian/patches/020_shot_keys.diff       2018-05-13 
16:22:49.000000000 +0200
+++ geki2-2.0.3/debian/patches/020_shot_keys.diff       2024-05-03 
13:03:17.000000000 +0200
@@ -4,16 +4,14 @@
 
 ===================================================================
 ---
- src/geki2.h   | 2 ++
- src/main.c    | 2 ++
- src/opening.c | 4 ++--
+ src/geki2.h   |    2 ++
+ src/main.c    |    2 ++
+ src/opening.c |    4 ++--
  3 files changed, 6 insertions(+), 2 deletions(-)
 
-diff --git a/src/geki2.h b/src/geki2.h
-index b293afb..71be21e 100644
 --- a/src/geki2.h
 +++ b/src/geki2.h
-@@ -21,7 +21,9 @@
+@@ -23,7 +23,9 @@
  #define KeyRight KXL_KEY_Right
  #define KeyLeft  KXL_KEY_Left
  #define KeyShot  KXL_KEY_z
@@ -23,8 +21,6 @@
  
  /** �����ޥ��� **/
  #define KNone      0
-diff --git a/src/main.c b/src/main.c
-index 52fb1d5..c325705 100644
 --- a/src/main.c
 +++ b/src/main.c
 @@ -24,6 +24,7 @@ void MainLoop(void)
@@ -43,8 +39,6 @@
          case KeyLeft:  Root->Key &= KLeftMask;  break;
          case KeyRight: Root->Key &= KRightMask; break;
          case KeyUp:    Root->Key &= KUpMask;    break;
-diff --git a/src/opening.c b/src/opening.c
-index 6b13109..9dac847 100644
 --- a/src/opening.c
 +++ b/src/opening.c
 @@ -24,7 +24,7 @@ char *menu_str[]={
diff -Nru geki2-2.0.3/debian/patches/series geki2-2.0.3/debian/patches/series
--- geki2-2.0.3/debian/patches/series   2018-05-13 16:22:49.000000000 +0200
+++ geki2-2.0.3/debian/patches/series   2024-05-03 12:59:49.000000000 +0200
@@ -5,4 +5,5 @@
 020_score_path.diff
 020_shot_keys.diff
 020_game.diff
+020_implicit-decl.patch
 098_no_bgm_mixup.diff

Reply via email to