diff --git a/src/daemon/old_main.c b/src/daemon/old_main.c index ab7a87f..e094107 100644 --- a/src/daemon/old_main.c +++ b/src/daemon/old_main.c @@ -39,7 +39,7 @@ #endif -int old_main() +int old_main(void) { int ctlfd, newfd; struct sockaddr_un ctladdr; diff --git a/src/headers/daemon.h b/src/headers/daemon.h index 24a1a97..3ee77c4 100644 --- a/src/headers/daemon.h +++ b/src/headers/daemon.h @@ -204,7 +204,7 @@ void gpm_exited(void); void gpm_killed(int signo); int open_console(const int mode); -int old_main(); +int old_main(void); int processConn(int fd); int processMouse(int fd, Gpm_Event *event, Gpm_Type *type, int kd_mode); @@ -234,7 +234,7 @@ void check_uniqueness(void); void check_kill(void); /* gpm.c */ -int old_main(); +int old_main(void); #endif diff --git a/src/headers/gpm.h b/src/headers/gpm.h index fe52e53..fa4b2a9 100644 --- a/src/headers/gpm.h +++ b/src/headers/gpm.h @@ -268,7 +268,10 @@ Gpm_Roi * Gpm_LowerRoi(Gpm_Roi *which, Gpm_Roi *after); /* libcurses.c */ /* #include Hmm... seems risky */ -extern int Gpm_Wgetch(); +/* Forward-declare ncurses WINDOW type for C23 compatibility. + * In C23, empty () means (void), so we need a proper prototype. */ +struct _win_st; +extern int Gpm_Wgetch(struct _win_st *); #define Gpm_Getch() (Gpm_Wgetch(NULL)) /* libxtra.c */ diff --git a/src/lib/libcurses.c b/src/lib/libcurses.c index e7ebf84..33cca70 100644 --- a/src/lib/libcurses.c +++ b/src/lib/libcurses.c @@ -95,7 +95,7 @@ static Gpm_Event ev; /* JD patch 11/08/1998 */ #define MAXNBPREVCHAR 4 /* I don't think more is usefull, JD */ static int nbprevchar=0, prevchar[MAXNBPREVCHAR]; - extern int gpm_convert_event(char *data, Gpm_Event *event); + extern int gpm_convert_event(unsigned char *data, Gpm_Event *event); int c; unsigned char mdata[4]; /* JD patch 11/08/1998 */