summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>2002-08-20 18:43:59 +0000
committerHerb Lewis <herb@samba.org>2002-08-20 18:43:59 +0000
commita5c59b2cd10016ecbd931531602ad1cb3660bbf9 (patch)
tree6b792fffdfeebf972d87f9fdab005933716d48bc
parent20f1765c32b2dd048e1572cd1b1e490459f7d5dc (diff)
downloadsamba-a5c59b2cd10016ecbd931531602ad1cb3660bbf9.tar.gz
samba-a5c59b2cd10016ecbd931531602ad1cb3660bbf9.tar.xz
samba-a5c59b2cd10016ecbd931531602ad1cb3660bbf9.zip
fix irix compile errors - cannot initialize array in declaration statement
with non-const values - strsep not defined
-rw-r--r--source/libads/ldap.c11
-rw-r--r--source/nmbd/nmbd_processlogon.c2
2 files changed, 10 insertions, 3 deletions
diff --git a/source/libads/ldap.c b/source/libads/ldap.c
index 26724894829..f0c4ad9040c 100644
--- a/source/libads/ldap.c
+++ b/source/libads/ldap.c
@@ -826,7 +826,11 @@ static ADS_STATUS ads_modlist_add(TALLOC_CTX *ctx, ADS_MODLIST *mods,
ADS_STATUS ads_mod_str(TALLOC_CTX *ctx, ADS_MODLIST *mods,
const char *name, const char *val)
{
- const char *values[2] = {val, NULL};
+ const char *values[2];
+
+ values[0] = val;
+ values[1] = NULL;
+
if (!val)
return ads_modlist_add(ctx, mods, LDAP_MOD_DELETE, name, NULL);
return ads_modlist_add(ctx, mods, LDAP_MOD_REPLACE, name,
@@ -861,7 +865,10 @@ ADS_STATUS ads_mod_strlist(TALLOC_CTX *ctx, ADS_MODLIST *mods,
static ADS_STATUS ads_mod_ber(TALLOC_CTX *ctx, ADS_MODLIST *mods,
const char *name, const struct berval *val)
{
- const struct berval *values[2] = {val, NULL};
+ const struct berval *values[2];
+
+ values[0] = val;
+ values[1] = NULL;
if (!val)
return ads_modlist_add(ctx, mods, LDAP_MOD_DELETE, name, NULL);
return ads_modlist_add(ctx, mods, LDAP_MOD_REPLACE|LDAP_MOD_BVALUES,
diff --git a/source/nmbd/nmbd_processlogon.c b/source/nmbd/nmbd_processlogon.c
index d6605d08f56..49de2e4a50e 100644
--- a/source/nmbd/nmbd_processlogon.c
+++ b/source/nmbd/nmbd_processlogon.c
@@ -334,7 +334,7 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
/* Push domain components */
dc = domain;
q1 = q;
- while ((component = strsep(&dc, "."))) {
+ while ((component = strtok(dc, "."))) {
size = push_ascii(&q[1], component, -1, 0);
SCVAL(q, 0, size);
q += (size + 1);