Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build problems at alpine linux #4404

Merged
merged 1 commit into from Nov 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions ldap/servers/plugins/sync/sync_persist.c
Expand Up @@ -9,9 +9,6 @@
#include <config.h>
#endif

#include <nspr4/prlog.h>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these two includes are unnecessary

#include <bits/stdint-intn.h>

#include "sync.h"

/* Main list of established persistent synchronizaton searches */
Expand Down
8 changes: 8 additions & 0 deletions ldap/servers/slapd/libglobs.c
Expand Up @@ -251,10 +251,12 @@ slapi_onoff_t init_cn_uses_dn_syntax_in_dns;
slapi_onoff_t init_global_backend_local;
slapi_onoff_t init_enable_nunc_stans;
#if defined(LINUX)
#if defined(__GLIBC__)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this group is not at available at alpine

slapi_int_t init_malloc_mxfast;
slapi_int_t init_malloc_trim_threshold;
slapi_int_t init_malloc_mmap_threshold;
#endif
#endif
slapi_onoff_t init_extract_pem;
slapi_onoff_t init_ignore_vattrs;
slapi_onoff_t init_enable_upgrade_hash;
Expand Down Expand Up @@ -1133,6 +1135,7 @@ static struct config_get_and_set
(void **)&global_slapdFrontendConfig.cn_uses_dn_syntax_in_dns, CONFIG_ON_OFF,
(ConfigGetFunc)config_get_cn_uses_dn_syntax_in_dns, &init_cn_uses_dn_syntax_in_dns, NULL},
#if defined(LINUX)
#if defined(__GLIBC__)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this group is not at available at alpine

{CONFIG_MALLOC_MXFAST, config_set_malloc_mxfast,
NULL, 0,
(void **)&global_slapdFrontendConfig.malloc_mxfast,
Expand All @@ -1148,6 +1151,7 @@ static struct config_get_and_set
(void **)&global_slapdFrontendConfig.malloc_mmap_threshold,
CONFIG_INT, (ConfigGetFunc)config_get_malloc_mmap_threshold,
&init_malloc_mmap_threshold, NULL},
#endif
#endif
{CONFIG_IGNORE_TIME_SKEW, config_set_ignore_time_skew,
NULL, 0,
Expand Down Expand Up @@ -1794,9 +1798,11 @@ FrontendConfig_init(void)
cfg->rootdn = slapi_ch_strdup(SLAPD_DEFAULT_DIRECTORY_MANAGER);
init_enable_nunc_stans = cfg->enable_nunc_stans = LDAP_OFF;
#if defined(LINUX)
#if defined(__GLIBC__)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this group is not at available at alpine

init_malloc_mxfast = cfg->malloc_mxfast = DEFAULT_MALLOC_UNSET;
init_malloc_trim_threshold = cfg->malloc_trim_threshold = DEFAULT_MALLOC_UNSET;
init_malloc_mmap_threshold = cfg->malloc_mmap_threshold = DEFAULT_MALLOC_UNSET;
#endif
#endif
init_extract_pem = cfg->extract_pem = LDAP_ON;
/*
Expand Down Expand Up @@ -8548,6 +8554,7 @@ config_get_extract_pem()
}

#if defined(LINUX)
#if defined(__GLIBC__)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this group is not at available at alpine

int
config_set_malloc_mxfast(const char *attrname, char *value, char *errorbuf, int apply __attribute__((unused)))
{
Expand Down Expand Up @@ -8675,6 +8682,7 @@ config_get_malloc_mmap_threshold()
return retVal;
}
#endif
#endif

char *
slapi_err2string(int result)
Expand Down
2 changes: 2 additions & 0 deletions ldap/servers/slapd/main.c
Expand Up @@ -529,6 +529,7 @@ main(int argc, char **argv)
daemon_ports_t ports_info = {0};

#ifdef LINUX
#if defined(__GLIBC__)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this group is not at available at alpine

char *m = getenv("SLAPD_MXFAST");
if (m) {
int val = atoi(m);
Expand All @@ -538,6 +539,7 @@ main(int argc, char **argv)
mallopt(M_MXFAST, val);
}
}
#endif
#endif

/*
Expand Down
3 changes: 3 additions & 0 deletions ldap/servers/slapd/slapi2nspr.c
Expand Up @@ -189,11 +189,14 @@ slapi_new_rwlock_prio(int32_t prio_writer)
pthread_rwlockattr_t attr;

pthread_rwlockattr_init(&attr);

#if defined(__GLIBC__)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this group is not at available at alpine

if (prio_writer) {
pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
} else {
pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_READER_NP);
}
#endif

rwlock = (pthread_rwlock_t *)slapi_ch_malloc(sizeof(pthread_rwlock_t));
if (rwlock) {
Expand Down