diff options
Diffstat (limited to 'user/openldap/time64.patch')
-rw-r--r-- | user/openldap/time64.patch | 198 |
1 files changed, 198 insertions, 0 deletions
diff --git a/user/openldap/time64.patch b/user/openldap/time64.patch new file mode 100644 index 000000000..780d67069 --- /dev/null +++ b/user/openldap/time64.patch @@ -0,0 +1,198 @@ +diff -ur a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c +--- a/libraries/libldap/os-ip.c 2022-12-12 23:12:56.618567894 -0600 ++++ b/libraries/libldap/os-ip.c 2022-12-13 00:07:17.852129075 -0600 +@@ -287,7 +287,7 @@ + int rc; + + +- Debug2(LDAP_DEBUG_TRACE, "ldap_int_poll: fd: %d tm: %ld\n", ++ Debug2(LDAP_DEBUG_TRACE, "ldap_int_poll: fd: %d tm: %lld\n", + s, tvp ? tvp->tv_sec : -1L ); + + #ifdef HAVE_POLL +@@ -439,7 +439,7 @@ + } + + Debug3(LDAP_DEBUG_TRACE, +- "ldap_pvt_connect: fd: %d tm: %ld async: %d\n", ++ "ldap_pvt_connect: fd: %d tm: %lld async: %d\n", + s, opt_tv ? tv.tv_sec : -1L, async); + + if ( opt_tv && ldap_pvt_ndelay_on(ld, s) == -1 ) +diff -ur a/libraries/libldap/os-local.c b/libraries/libldap/os-local.c +--- a/libraries/libldap/os-local.c 2022-12-12 23:12:56.618567894 -0600 ++++ b/libraries/libldap/os-local.c 2022-12-12 23:36:15.152936427 -0600 +@@ -164,7 +164,7 @@ + } + + Debug3(LDAP_DEBUG_TRACE, +- "ldap_connect_timeout: fd: %d tm: %ld async: %d\n", ++ "ldap_connect_timeout: fd: %d tm: %lld async: %d\n", + s, opt_tv ? tv.tv_sec : -1L, async); + + if ( ldap_pvt_ndelay_on(ld, s) == -1 ) return -1; +diff -ur a/libraries/libldap/result.c b/libraries/libldap/result.c +--- a/libraries/libldap/result.c 2022-12-12 23:12:56.618567894 -0600 ++++ b/libraries/libldap/result.c 2022-12-12 23:34:24.977768222 -0600 +@@ -264,8 +264,8 @@ + Debug2( LDAP_DEBUG_TRACE, "wait4msg ld %p msgid %d (infinite timeout)\n", + (void *)ld, msgid ); + } else { +- Debug3( LDAP_DEBUG_TRACE, "wait4msg ld %p msgid %d (timeout %ld usec)\n", +- (void *)ld, msgid, (long)timeout->tv_sec * 1000000 + timeout->tv_usec ); ++ Debug3( LDAP_DEBUG_TRACE, "wait4msg ld %p msgid %d (timeout %lld usec)\n", ++ (void *)ld, msgid, (time_t)timeout->tv_sec * 1000000 + timeout->tv_usec ); + } + #endif /* LDAP_DEBUG */ + +diff -ur a/servers/slapd/back-ldap/bind.c b/servers/slapd/back-ldap/bind.c +--- a/servers/slapd/back-ldap/bind.c 2022-12-12 23:12:56.614567788 -0600 ++++ b/servers/slapd/back-ldap/bind.c 2022-12-12 23:43:22.086371097 -0600 +@@ -2999,14 +2999,14 @@ + } + + if ( lc->lcb_create_time != 0 ) { +- len = snprintf( tbuf, sizeof(tbuf), "%ld", lc->lcb_create_time ); ++ len = snprintf( tbuf, sizeof(tbuf), "%lld", lc->lcb_create_time ); + if ( ptr + sizeof(" created=") + len >= end ) return -1; + ptr = lutil_strcopy( ptr, " created=" ); + ptr = lutil_strcopy( ptr, tbuf ); + } + + if ( lc->lcb_time != 0 ) { +- len = snprintf( tbuf, sizeof(tbuf), "%ld", lc->lcb_time ); ++ len = snprintf( tbuf, sizeof(tbuf), "%lld", lc->lcb_time ); + if ( ptr + sizeof(" modified=") + len >= end ) return -1; + ptr = lutil_strcopy( ptr, " modified=" ); + ptr = lutil_strcopy( ptr, tbuf ); +@@ -3185,7 +3185,7 @@ + */ + slap_wake_listener(); + Debug( LDAP_DEBUG_TRACE, +- "ldap_back_conn_prune: scheduled connection expiry timer to %ld sec\n", ++ "ldap_back_conn_prune: scheduled connection expiry timer to %lld sec\n", + li->li_conn_expire_task->interval.tv_sec ); + } else if ( next_timeout == -1 && li->li_conn_expire_task != NULL ) { + if ( ldap_pvt_runqueue_isrunning( &slapd_rq, li->li_conn_expire_task ) ) { +@@ -3221,7 +3221,7 @@ + "ldap_back_conn_expire_timer" ); + slap_wake_listener(); + Debug( LDAP_DEBUG_TRACE, +- "ldap_back_conn_prune: scheduled connection expiry timer to %ld sec\n", ++ "ldap_back_conn_prune: scheduled connection expiry timer to %lld sec\n", + li->li_conn_expire_task->interval.tv_sec ); + } + ldap_pvt_thread_mutex_unlock( &slapd_rq.rq_mutex ); +diff -ur a/servers/slapd/overlays/dds.c b/servers/slapd/overlays/dds.c +--- a/servers/slapd/overlays/dds.c 2022-12-12 23:12:56.614567788 -0600 ++++ b/servers/slapd/overlays/dds.c 2022-12-12 23:42:29.632772350 -0600 +@@ -418,7 +418,7 @@ + assert( ttl <= DDS_RF2589_MAX_TTL ); + + bv.bv_val = ttlbuf; +- bv.bv_len = snprintf( ttlbuf, sizeof( ttlbuf ), "%ld", ttl ); ++ bv.bv_len = snprintf( ttlbuf, sizeof( ttlbuf ), "%lld", ttl ); + assert( bv.bv_len < sizeof( ttlbuf ) ); + + /* FIXME: apparently, values in op->ora_e are malloc'ed +@@ -696,7 +696,7 @@ + goto done; + } + +- bv_entryTtl.bv_len = snprintf( textbuf, sizeof( textbuf ), "%ld", entryTtl ); ++ bv_entryTtl.bv_len = snprintf( textbuf, sizeof( textbuf ), "%lld", entryTtl ); + break; + + default: +@@ -918,7 +918,7 @@ + ttl = (ttl < 0) ? 0 : ttl; + assert( ttl <= DDS_RF2589_MAX_TTL ); + +- len = snprintf( ttlbuf, sizeof(ttlbuf), "%ld", ttl ); ++ len = snprintf( ttlbuf, sizeof(ttlbuf), "%lld", ttl ); + if ( len < 0 ) + { + goto done; +@@ -1178,7 +1178,7 @@ + ttlmod.sml_values = ttlvalues; + ttlmod.sml_numvals = 1; + ttlvalues[ 0 ].bv_val = ttlbuf; +- ttlvalues[ 0 ].bv_len = snprintf( ttlbuf, sizeof( ttlbuf ), "%ld", ttl ); ++ ttlvalues[ 0 ].bv_len = snprintf( ttlbuf, sizeof( ttlbuf ), "%lld", ttl ); + BER_BVZERO( &ttlvalues[ 1 ] ); + + /* the entryExpireTimestamp is added by modify */ +@@ -1206,7 +1206,7 @@ + rs->sr_rspoid = ch_strdup( slap_EXOP_REFRESH.bv_val ); + + Log( LDAP_DEBUG_TRACE, LDAP_LEVEL_INFO, +- "%s REFRESH dn=\"%s\" TTL=%ld\n", ++ "%s REFRESH dn=\"%s\" TTL=%lld\n", + op->o_log_prefix, op->o_req_ndn.bv_val, ttl ); + } + +diff -ur a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c +--- a/servers/slapd/overlays/pcache.c 2022-12-12 23:12:56.614567788 -0600 ++++ b/servers/slapd/overlays/pcache.c 2022-12-13 00:07:55.205195373 -0600 +@@ -375,12 +375,12 @@ + attrset_len = sprintf( attrset_buf, + "%lu", (unsigned long)q->qtemp->attr_set_index ); + expiry_len = sprintf( expiry_buf, +- "%lu", (unsigned long)q->expiry_time ); ++ "%llu", (unsigned long long)q->expiry_time ); + answerable_len = snprintf( answerable_buf, sizeof( answerable_buf ), + "%lu", q->answerable_cnt ); + if ( q->refresh_time ) + refresh_len = sprintf( refresh_buf, +- "%lu", (unsigned long)q->refresh_time ); ++ "%llu", (unsigned long long)q->refresh_time ); + else + refresh_len = 0; + +@@ -1601,8 +1601,8 @@ + + new_cached_query->lru_up = NULL; + new_cached_query->lru_down = NULL; +- Debug( pcache_debug, "Added query expires at %ld (%s)\n", +- (long) new_cached_query->expiry_time, ++ Debug( pcache_debug, "Added query expires at %lld (%s)\n", ++ (long long) new_cached_query->expiry_time, + pc_caching_reason_str[ why ] ); + + new_cached_query->scope = query->scope; +@@ -2729,7 +2729,7 @@ + pbi->bi_flags |= BI_HASHED; + } else { + Debug( pcache_debug, "pc_bind_search: cache is stale, " +- "reftime: %ld, current time: %ld\n", ++ "reftime: %lld, current time: %lld\n", + pbi->bi_cq->bindref_time, op->o_time ); + } + } else if ( pbi->bi_si ) { +@@ -3865,7 +3865,7 @@ + struct berval bv; + switch( c->type ) { + case PC_MAIN: +- bv.bv_len = snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s %d %d %d %ld", ++ bv.bv_len = snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s %d %d %d %lld", + cm->db.bd_info->bi_type, cm->max_entries, cm->numattrsets, + cm->num_entries_limit, cm->cc_period ); + bv.bv_val = c->cr_msg; +@@ -3909,7 +3909,7 @@ + /* HEADS-UP: always print all; + * if optional == 0, ignore */ + bv.bv_len = snprintf( c->cr_msg, sizeof( c->cr_msg ), +- " %d %ld %ld %ld %ld", ++ " %d %lld %lld %lld %lld", + temp->attr_set_index, + temp->ttl, + temp->negttl, +@@ -3931,7 +3931,7 @@ + for (temp=qm->templates; temp; temp=temp->qmnext) { + if ( !temp->bindttr ) continue; + bv.bv_len = snprintf( c->cr_msg, sizeof( c->cr_msg ), +- " %d %ld %s ", ++ " %d %lld %s ", + temp->attr_set_index, + temp->bindttr, + ldap_pvt_scope2str( temp->bindscope )); |