wireshark/macosx-support-lib-patches/libssh-void-arglists.patch
Guy Harris 3c1ade9223 macos-setup: patch libssh to avoid compiler errors.
At least with Xcode 15 beta on macOS 14 beta, some code in libssh gets
the warning

    error: a function declaration without a prototype is deprecated in
        all versions of C [-Werror,-Wstrict-prototypes]

because they define functions with an empty argument list as

    <type> func()

rather than

    <type> func(void)

Maybe C23 will finally consider

    <type> func()

as meaning "func() takes no arguments" rather than "func() is being
defined without prototypes".

(And, no, I don't know why it says that about a function *definition*
rather than a funciton *declaration*.)
2023-06-06 11:02:29 +00:00

23 lines
462 B
Diff

--- src/init.c.orig 2021-03-15 00:11:33
+++ src/init.c 2023-06-06 03:15:37
@@ -269,7 +269,7 @@
*
* @see ssh_init()
*/
-bool is_ssh_initialized() {
+bool is_ssh_initialized(void) {
bool is_initialized = false;
--- examples/sshnetcat.c.orig 2021-08-26 05:27:42
+++ examples/sshnetcat.c 2023-06-06 03:20:21
@@ -233,7 +233,7 @@
}
void cleanup_pcap(void);
-void cleanup_pcap(){
+void cleanup_pcap(void){
ssh_pcap_file_free(pcap);
pcap=NULL;
}