troglobit / sysklogd

BSD syslog daemon with syslog()/syslogp() API replacement for Linux, RFC3164 + RFC5424
https://troglobit.com/sysklogd.html
Other
93 stars 20 forks source link

Fix function prototypes for `-std=c2x` #71

Closed zlamas closed 10 months ago

zlamas commented 10 months ago

This fixes build errors when using -std=c2x flag:

syslogd.c:2156:6: error: conflicting types for 'endtty'; have 'void(int)'
 2156 | void endtty(int signo)
      |      ^~~~~~
syslogd.c:204:13: note: previous declaration of 'endtty' with type 'void(void)'
  204 | void        endtty();
      |             ^~~~~~
syslogd.c:2264:6: error: conflicting types for 'reapchild'; have 'void(int)'
 2264 | void reapchild(int signo)
      |      ^~~~~~~~~
syslogd.c:206:13: note: previous declaration of 'reapchild' with type 'void(void)'
  206 | void        reapchild();
      |             ^~~~~~~~~
syslogd.c:2443:6: error: conflicting types for 'debug_switch'; have 'void(int)'
 2443 | void debug_switch(int signo)
      |      ^~~~~~~~~~~~
syslogd.c:212:13: note: previous declaration of 'debug_switch' with type 'void(void)'
  212 | void        debug_switch();
      |             ^~~~~~~~~~~~
troglobit commented 10 months ago

Nice, thanks! 🙏