forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. when db.h provides ndbm compat layer, include db.h not ndbm.h. Otherwise, compilation fails due to incompatible type declarations between libSystem and db includes. 2. tell the build system that db_185.h is present. Otherwise, the code includes db.h as if it's v1 header. (It's not.) 3. link some tests with -lresolv where needed. All three patches are posted upstream. Closes: NixOS#347616
- Loading branch information
1 parent
a76df1d
commit 973049e
Showing
4 changed files
with
113 additions
and
2 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
pkgs/development/libraries/kerberos/0001-Define-HAVE_DB_185_H.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From 08d719e96214f648ae95043acc308deca36e1f7a Mon Sep 17 00:00:00 2001 | ||
From: Ihar Hrachyshka <[email protected]> | ||
Date: Tue, 15 Oct 2024 13:52:39 -0400 | ||
Subject: [PATCH] Define HAVE_DB_185_H | ||
|
||
--- | ||
cf/db.m4 | 3 +++ | ||
1 file changed, 3 insertions(+) | ||
|
||
diff --git a/cf/db.m4 b/cf/db.m4 | ||
index c0b4510b6..c95a9dee9 100644 | ||
--- a/cf/db.m4 | ||
+++ b/cf/db.m4 | ||
@@ -57,6 +57,9 @@ AS_IF([test "x$with_berkeley_db" != xno], | ||
db.h \ | ||
])]) | ||
|
||
+dnl detect if compat db_185.h is present | ||
+AC_CHECK_HEADERS([db_185.h]) | ||
+ | ||
dnl db_create is used by db3 and db4 and db5 and db6 | ||
|
||
AC_FIND_FUNC_NO_LIBS(db_create, [$dbheader] db-6 db-5 db4 db3 db, [ | ||
-- | ||
2.46.0 | ||
|
25 changes: 25 additions & 0 deletions
25
pkgs/development/libraries/kerberos/0001-Include-db.h-for-nbdb-compat-mode.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From 749d9451293f9d9f8a3f506401cae369003aeebf Mon Sep 17 00:00:00 2001 | ||
From: Ihar Hrachyshka <[email protected]> | ||
Date: Sun, 13 Oct 2024 17:16:13 -0400 | ||
Subject: [PATCH] Include db.h for nbdb compat mode | ||
|
||
--- | ||
lib/otp/otp_db.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/lib/otp/otp_db.c b/lib/otp/otp_db.c | ||
index 036359c1d..32c04bc8c 100644 | ||
--- a/lib/otp/otp_db.c | ||
+++ b/lib/otp/otp_db.c | ||
@@ -39,7 +39,7 @@ RCSID("$Id$"); | ||
#include "otp_locl.h" | ||
|
||
#if defined(HAVE_DB_NDBM) | ||
-# include <ndbm.h> | ||
+# include <db.h> | ||
#elif !defined(HAVE_NDBM) | ||
# include "ndbm_wrap.h" | ||
#endif | ||
-- | ||
2.46.0 | ||
|
51 changes: 51 additions & 0 deletions
51
pkgs/development/libraries/kerberos/0001-Link-tests-with-libresolv.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
From 862900febaec4a2c70257a39374b81138ee9f168 Mon Sep 17 00:00:00 2001 | ||
From: Ihar Hrachyshka <[email protected]> | ||
Date: Tue, 15 Oct 2024 16:06:33 -0400 | ||
Subject: [PATCH] Link tests with libresolv | ||
|
||
--- | ||
lib/gssapi/Makefile.am | 1 + | ||
lib/krb5/Makefile.am | 2 ++ | ||
lib/roken/Makefile.am | 1 + | ||
3 files changed, 4 insertions(+) | ||
|
||
diff --git a/lib/gssapi/Makefile.am b/lib/gssapi/Makefile.am | ||
index 3254866dc..db967e586 100644 | ||
--- a/lib/gssapi/Makefile.am | ||
+++ b/lib/gssapi/Makefile.am | ||
@@ -403,6 +403,7 @@ LDADD = libgssapi.la \ | ||
$(top_builddir)/lib/krb5/libkrb5.la \ | ||
$(LIB_roken) | ||
|
||
+test_names_LDFLAGS = -lresolv | ||
test_names_LDADD = $(LDADD) $(top_builddir)/lib/asn1/libasn1.la | ||
test_context_LDADD = $(LDADD) $(top_builddir)/lib/asn1/libasn1.la $(top_builddir)/lib/wind/libwind.la | ||
|
||
diff --git a/lib/krb5/Makefile.am b/lib/krb5/Makefile.am | ||
index ecce461dd..e22cfe87c 100644 | ||
--- a/lib/krb5/Makefile.am | ||
+++ b/lib/krb5/Makefile.am | ||
@@ -330,6 +330,8 @@ test_rfc3961_LDADD = \ | ||
$(LIB_hcrypto) \ | ||
$(LIB_roken) | ||
|
||
+test_plugin_LDFLAGS = -lresolv | ||
+ | ||
if DEVELOPER_MODE | ||
headerdeps = $(dist_libkrb5_la_SOURCES) | ||
endif | ||
diff --git a/lib/roken/Makefile.am b/lib/roken/Makefile.am | ||
index 1f530c7ae..8350d7034 100644 | ||
--- a/lib/roken/Makefile.am | ||
+++ b/lib/roken/Makefile.am | ||
@@ -54,6 +54,7 @@ libtest_la_CFLAGS = -DTEST_SNPRINTF -DTEST_STRPFTIME | ||
|
||
parse_reply_test_SOURCES = parse_reply-test.c resolve.c | ||
parse_reply_test_CFLAGS = -DTEST_RESOLVE | ||
+parse_reply_test_LDFLAGS = -lresolv | ||
|
||
test_readenv_SOURCES = test-readenv.c test-mem.c | ||
test_auxval_SOURCES = test-auxval.c | ||
-- | ||
2.46.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters