Skip to content

Commit

Permalink
net/nss_ldap: Fix LLVM15 build
Browse files Browse the repository at this point in the history
./configure's test for Heimdal results in,

conftest.c:47:12: error: incompatible pointer to integer conversion initializing
 'const char' with an expression of type 'const char *'; dereference with * [-Wi
nt-conversion]
const char hv = heimdal_version;
           ^    ~~~~~~~~~~~~~~~
                *

This causes ./configure to erroneously assume 14-CURRENT uses MIT instead
of Heimdal, resulting in a subsequent build failure because MIT's
<profile.h> cannot be found.

MFH:		2023Q3
  • Loading branch information
cschuber committed May 10, 2023
1 parent 3f46415 commit 515552b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions net/nss_ldap/files/patch-configure.in
@@ -1,5 +1,5 @@
--- configure.in.orig
+++ configure.in
--- configure.in.orig 2009-11-06 02:28:08.000000000 -0800
+++ configure.in 2023-05-09 21:54:34.360457000 -0700
@@ -97,11 +97,15 @@
linux*) nss_ldap_so_LDFLAGS="-shared -Wl,-Bdynamic -Wl,--version-script,\$(srcdir)/exports.linux" ;;
*) nss_ldap_so_LDFLAGS="-shared -Wl,-Bdynamic" ;;
Expand All @@ -24,21 +24,22 @@
AC_CHECK_HEADERS(irs.h) ;;
esac
AC_CHECK_HEADERS(thread.h)
@@ -188,6 +191,13 @@
@@ -188,6 +191,14 @@
AC_CHECK_HEADERS(gssapi/gssapi_krb5.h gssapi.h)
AC_CHECK_HEADERS(krb5.h)

+AC_MSG_CHECKING([if Kerberos is Heimdal])
+AC_TRY_LINK([#include <krb5.h>],
+ [const char hv = heimdal_version;],
+ [char hv = heimdal_version;],
+ [hv = hv;],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HEIMDAL,1,[Define if Kerberos is Heimdal])],
+ [AC_MSG_RESULT(no)])
+
AC_CHECK_LIB(resolv, main)
AC_CHECK_LIB(nsl, main)
AC_CHECK_LIB(socket, main)
@@ -230,7 +240,6 @@
@@ -230,7 +241,6 @@
AC_CHECK_FUNCS(gethostbyname)
AC_CHECK_FUNCS(nsdispatch)
AC_CHECK_LIB(pthread_nonshared, main)
Expand Down

0 comments on commit 515552b

Please sign in to comment.