summaryrefslogtreecommitdiff
path: root/source4/lib/replace
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/replace')
-rw-r--r--source4/lib/replace/replace.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/lib/replace/replace.c b/source4/lib/replace/replace.c
index 79b452d69c..20a420084a 100644
--- a/source4/lib/replace/replace.c
+++ b/source4/lib/replace/replace.c
@@ -512,7 +512,15 @@ int get_time_zone(time_t t)
#ifdef HAVE_STRTOUQ
return strtouq(str, endptr, base);
#else
-#error "system must support 64 bit integer read from strings"
+ unsigned long long int v;
+ if (sscanf(str, "%lli", &v) != 1) {
+ smb_panic("system does not support %lli in sscanf");
+ }
+ if (endptr) {
+ /* try to get endptr right - uggh */
+ strtoul(str, endptr, base);
+ }
+ return v;
#endif
}
#endif