--- squid-devel/files/patch-src_acl_external_eDirectory__userip_ext__edirectory__userip__acl.cc 2020-05-10 11:13:28.334790000 +0300 +++ squid-devel/files/patch-src_acl_external_eDirectory__userip_ext__edirectory__userip__acl.cc 2020-05-10 11:31:40.466443000 +0300 @@ -1,12 +1,15 @@ ---- src/acl/external/eDirectory_userip/ext_edirectory_userip_acl.cc.orig 2020-04-19 10:50:48 UTC +--- src/acl/external/eDirectory_userip/ext_edirectory_userip_acl.cc.orig 2020-04-19 12:38:51 UTC +++ src/acl/external/eDirectory_userip/ext_edirectory_userip_acl.cc -@@ -69,6 +69,9 @@ +@@ -69,6 +69,12 @@ #ifdef HAVE_NETDB_H #include #endif -+#include ++#ifdef HAVE_SYS_SOCKET_H +#include ++#endif ++#ifdef HAVE_NETINET_IN_H +#include ++#endif #ifdef HELPER_INPUT_BUFFER #define EDUI_MAXLEN HELPER_INPUT_BUFFER --- squid-devel/files/patch-src_acl_external_kerberos__ldap__group_support__krb5.cc 1970-01-01 03:00:00.000000000 +0300 +++ squid-devel/files/patch-src_acl_external_kerberos__ldap__group_support__krb5.cc 2020-05-10 11:31:40.466590000 +0300 @@ -0,0 +1,19 @@ +--- src/acl/external/kerberos_ldap_group/support_krb5.cc.orig 2020-04-19 12:38:51 UTC ++++ src/acl/external/kerberos_ldap_group/support_krb5.cc +@@ -467,10 +467,15 @@ krb5_create_cache(char *domain, char *service_principa + } + + // overwrite limitation of enctypes ++#if USE_HEIMDAL_KRB5 ++ creds->session.keytype = 0; ++ if (creds->session.keyvalue.length>0) ++ krb5_free_keyblock_contents(kparam.context, &creds->session); ++#else + creds->keyblock.enctype = 0; + if (creds->keyblock.contents) + krb5_free_keyblock_contents(kparam.context, &creds->keyblock); +- ++#endif + code = krb5_get_credentials(kparam.context, 0, kparam.cc[ccindex], creds, &tgt_creds); + if (code) { + k5_error("Error while getting tgt", code); --- squid-devel/files/patch-src_acl_external_session_ext__session__acl.cc 2020-05-10 11:13:28.335741000 +0300 +++ squid-devel/files/patch-src_acl_external_session_ext__session__acl.cc 2020-05-10 11:34:52.246645000 +0300 @@ -1,11 +1,13 @@ ---- src/acl/external/session/ext_session_acl.cc.orig 2020-04-19 10:50:48 UTC +--- src/acl/external/session/ext_session_acl.cc.orig 2020-05-10 08:32:32 UTC +++ src/acl/external/session/ext_session_acl.cc -@@ -137,7 +137,7 @@ static void init_db(void) +@@ -137,6 +137,10 @@ static void init_db(void) } } #elif USE_TRIVIALDB -- db = tdb_open(db_path, 0, TDB_CLEAR_IF_FIRST, O_CREAT|O_DSYNC, 0666); -+ db = tdb_open(db_path, 0, TDB_CLEAR_IF_FIRST, O_CREAT|O_SYNC, 0666); ++#if _SQUID_FREEBSD_ && !defined(O_DSYNC) ++ // FreeBSD lacks O_DSYNC, O_SYNC is closest to correct behaviour ++#define O_DSYNC O_SYNC ++#endif + db = tdb_open(db_path, 0, TDB_CLEAR_IF_FIRST, O_CREAT|O_DSYNC, 0666); #endif if (!db) { - fprintf(stderr, "FATAL: %s: Failed to open session db '%s'\n", program_name, db_path);