squid/fix_configuration_error.patch

33 lines
1.4 KiB
Diff

Fix warnings that result in build failures with -Wreturn-type errors
error: no return statement in function returning non-void
warning: 'conv' defined but not used
202 | static struct pam_conv conv = { &password_conversation, 0 };
| ^~~~
cc1plus: some warnings being treated as errors
Index: squid-4.8/acinclude/pam.m4
===================================================================
--- squid-4.8.orig/acinclude/pam.m4
+++ squid-4.8/acinclude/pam.m4
@@ -21,7 +21,7 @@ AC_DEFUN([CHECK_STRUCT_PAM_CONV], [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <security/pam_appl.h>
static int
-password_conversation(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *appdata_ptr) {}
+password_conversation(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *appdata_ptr) { return 0; }
static struct pam_conv conv = { &password_conversation, 0 };
]])], [
squid_cv_pam_conv_signature=linux
@@ -29,7 +29,7 @@ static struct pam_conv conv = { &passwor
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <security/pam_appl.h>
static int
-password_conversation(int num_msg, struct pam_message **msg, struct pam_response **resp, void *appdata_ptr) {}
+password_conversation(int num_msg, struct pam_message **msg, struct pam_response **resp, void *appdata_ptr) { return 0; }
static struct pam_conv conv = { &password_conversation, 0 };
]])], [
squid_cv_pam_conv_signature=solaris