Further C compatibility fixes, run autoconf

This commit is contained in:
Florian Weimer 2023-12-18 13:52:25 +01:00
parent 03ae4fdc94
commit 787a553722
3 changed files with 64 additions and 2 deletions

36
autofs-c99.patch Normal file
View File

@ -0,0 +1,36 @@
Add casts to SASL callbacks to avoid incompatible-pointer-types
errors.
Submitted upstream:
<https://lore.kernel.org/autofs/878r5r4qy5.fsf@oldenburg.str.redhat.com/>
diff --git a/modules/cyrus-sasl.c b/modules/cyrus-sasl.c
index e742eaf8ebe6ce8a..78b77942ba3efd56 100644
--- a/modules/cyrus-sasl.c
+++ b/modules/cyrus-sasl.c
@@ -109,17 +109,17 @@ static int getpass_func(sasl_conn_t *, void *, int, sasl_secret_t **);
static int getuser_func(void *, int, const char **, unsigned *);
static sasl_callback_t callbacks[] = {
- { SASL_CB_USER, &getuser_func, NULL },
- { SASL_CB_AUTHNAME, &getuser_func, NULL },
- { SASL_CB_PASS, &getpass_func, NULL },
+ { SASL_CB_USER, (int(*)(void)) &getuser_func, NULL },
+ { SASL_CB_AUTHNAME, (int(*)(void)) &getuser_func, NULL },
+ { SASL_CB_PASS, (int(*)(void)) &getpass_func, NULL },
{ SASL_CB_LIST_END, NULL, NULL },
};
static sasl_callback_t debug_callbacks[] = {
- { SASL_CB_LOG, &sasl_log_func, NULL },
- { SASL_CB_USER, &getuser_func, NULL },
- { SASL_CB_AUTHNAME, &getuser_func, NULL },
- { SASL_CB_PASS, &getpass_func, NULL },
+ { SASL_CB_LOG, (int(*)(void)) &sasl_log_func, NULL },
+ { SASL_CB_USER, (int(*)(void)) &getuser_func, NULL },
+ { SASL_CB_AUTHNAME, (int(*)(void)) &getuser_func, NULL },
+ { SASL_CB_PASS, (int(*)(void)) &getpass_func, NULL },
{ SASL_CB_LIST_END, NULL, NULL },
};

View File

@ -0,0 +1,20 @@
Fix argument type for ldap_parse_page_control in configure probe,
to suppress an incompatible-pointer-types error.
Submitted upstream:
<https://lore.kernel.org/autofs/874jgf4qwu.fsf@oldenburg.str.redhat.com/>
diff --git a/aclocal.m4 b/aclocal.m4
index 1046d72b1560a8ea..8dad987224fe5094 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -427,7 +427,7 @@ AC_LINK_IFELSE(
struct berval *c;
int ret;
LDAPControl **clp;
- ret = ldap_parse_page_control(ld,clp,ct,c); ]])],
+ ret = ldap_parse_page_control(ld,clp,ct,&c); ]])],
[ af_have_ldap_parse_page_control=yes
AC_MSG_RESULT(yes) ],
[ AC_MSG_RESULT(no) ])

View File

@ -12,10 +12,12 @@
Summary: A tool for automatically mounting and unmounting filesystems
Name: autofs
Version: 5.1.9
Release: 3%{?dist}
Release: 4%{?dist}
Epoch: 1
License: GPL-2.0-or-later
Source: https://www.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.gz
Patch0: autofs-configure-c99.patch
Patch1: autofs-c99.patch
%if %{with_systemd}
BuildRequires: systemd-units
@ -71,7 +73,7 @@ unmountar dem när de har varit oanvända en bestämd tid. Detta kan
inkludera nätfilsystem, CD-ROM, floppydiskar, och vidare.
%prep
%setup -q -n %{name}-%{version}
%autosetup -p1 -n %{name}-%{version}
echo %{version}-%{release} > .version
%if %{with_systemd}
%define unitdir %{?_unitdir:/usr/lib/systemd/system}
@ -82,6 +84,7 @@ echo %{version}-%{release} > .version
%endif
%build
autoreconf -iv
LDFLAGS=-Wl,-z,now
%configure \
--disable-mount-locking \
@ -187,6 +190,9 @@ fi
%dir /etc/auto.master.d
%changelog
* Mon Dec 18 2023 Florian Weimer <fweimer@redhat.com> - 1:5.1.9-4
- Further C compatibility fixes, run autoconf
* Tue Nov 07 2023 Ian Kent <ikent@redhat.com> - 1:5.1.9-3
- Also update package revision.