Skip to content

does not build with gcc15 #248

@pgajdos

Description

@pgajdos

I guess one way how to fix could be:

diff -upr siege-4.1.7.orig/src/crew.c siege-4.1.7/src/crew.c
--- siege-4.1.7.orig/src/crew.c 2025-07-08 09:49:10.798475362 +0000
+++ siege-4.1.7/src/crew.c      2025-07-08 09:57:07.179600520 +0000
@@ -147,7 +147,7 @@ private void
 }

 BOOLEAN
-crew_add(CREW crew, void (*routine)(), void *arg)
+crew_add(CREW crew, void (*routine)(void *), void *arg)
 {
   int c;
   WORK *workptr;
diff -upr siege-4.1.7.orig/src/crew.h siege-4.1.7/src/crew.h
--- siege-4.1.7.orig/src/crew.h 2025-07-08 09:49:10.797947904 +0000
+++ siege-4.1.7/src/crew.h      2025-07-08 09:58:32.764227730 +0000
@@ -28,7 +28,7 @@

 typedef struct work
 {
-  void          (*routine)();
+  void          (*routine)(void *);
   void          *arg;
   struct work   *next;
 } WORK;
@@ -36,7 +36,7 @@ typedef struct work
 typedef struct CREW_T *CREW;

 CREW    new_crew(int size, int maxsize, BOOLEAN block);
-BOOLEAN crew_add(CREW this, void (*routine)(), void *arg); 
+BOOLEAN crew_add(CREW this, void (*routine)(void *), void *arg); 
 BOOLEAN crew_cancel(CREW this);
 BOOLEAN crew_join(CREW this, BOOLEAN finish, void **payload);
 void    crew_destroy(CREW this);
diff -upr siege-4.1.7.orig/src/date.h siege-4.1.7/src/date.h
--- siege-4.1.7.orig/src/date.h 2025-07-08 09:49:10.797744846 +0000
+++ siege-4.1.7/src/date.h      2025-07-08 09:55:32.894259646 +0000
@@ -34,7 +34,7 @@ extern  size_t DATESIZE;
  * because then we have one destroyer
  * that we can pass to the HASH
  */
-DATE   new_date();
+DATE   new_date(char *date);
 DATE   new_etag(char *etag);

 DATE    date_destroy(DATE this);
diff -upr siege-4.1.7.orig/src/handler.h siege-4.1.7/src/handler.h
--- siege-4.1.7.orig/src/handler.h      2025-07-08 09:49:10.798750599 +0000
+++ siege-4.1.7/src/handler.h   2025-07-08 09:58:59.491423601 +0000
@@ -26,7 +26,7 @@
 #include <signal.h>
 #include <crew.h>

-void spin_doctor();
+void spin_doctor(CREW crew);
 void sig_handler(CREW crew);

 #endif/*HANDLER_H*/
diff -upr siege-4.1.7.orig/src/page.h siege-4.1.7/src/page.h
--- siege-4.1.7.orig/src/page.h 2025-07-08 09:49:10.798683939 +0000
+++ siege-4.1.7/src/page.h      2025-07-08 09:56:06.940110550 +0000
@@ -7,7 +7,7 @@
  */
 typeddiff -upr siege-4.1.7.orig/src/setup.h siege-4.1.7/src/setup.h
--- siege-4.1.7.orig/src/setup.h        2025-07-08 09:49:10.796492272 +0000
+++ siege-4.1.7/src/setup.h     2025-07-08 09:53:58.006460026 +0000
@@ -96,16 +96,16 @@ char *strchr (), *strrchr ();


 #ifndef HAVE_STRCASECMP
-int strcasecmp();
+int strcasecmp(const char *, const char *);
 #endif
 #ifndef HAVE_STRNCASECMP
-int strncasecmp();
+int strncasecmp(const char s1[], const char s2[], size_t n);
 #endif
 #ifndef HAVE_STRNCMP
-int strncmp();
+int strncmp(const);
 #endif
 #ifndef HAVE_STRLEN
-int strlen();
+int strlen(const char s1[], const char s2[], size_t n);
 #endif

 #include <url.h>

ef struct PAGE_T *PAGE;

-PAGE   new_page();
+PAGE   new_page(char *str);
 PAGE   page_destroy(PAGE this);
 void   page_concat(PAGE this, const char *str, const int len);
 void   page_clear(PAGE this);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions