[Samba] Samba 4.2.0rc4 fails to start up

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Feb 11 09:18:27 MST 2015


On Wed, Feb 11, 2015 at 10:04:03AM -0500, Thomas Schulz wrote:
> > On Wed, Feb 11, 2015 at 11:13:42AM +0100, Volker Lendecke wrote:
> > > On Tue, Feb 10, 2015 at 08:59:21PM -0800, Jeremy Allison wrote:
> > > > Ah ok - I expected as much. snprintf seems to be
> > > > broken in that it's returning -1.
> > > > 
> > > > Is this our snprintf or one from Solaris ? Can
> > > > you try and track down why it's returning -1 ?
> > > 
> > > Maybe Solaris' snprintf does not know about the %j modifier?
> > 
> > Crap... Probably our own libreplace snprintf version does
> > not do it....
> > 
> > Volker
> 
> You guys sure work at odd hours.

Not so odd if you take timezones into account :-)

The attached (uncompiled, I don't have access to Solaris
right now) patch *might* already do it for you. Can you give
it a try?

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From f097f14094b36a74c9aafc63e465645e82c2b9c6 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Wed, 11 Feb 2015 17:16:50 +0100
Subject: [PATCH] snprintf: Try to support %j

---
 lib/replace/snprintf.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/replace/snprintf.c b/lib/replace/snprintf.c
index 6b4a711..86ba74c 100644
--- a/lib/replace/snprintf.c
+++ b/lib/replace/snprintf.c
@@ -445,6 +445,10 @@ static int dopr(char *buffer, size_t maxlen, const char *format, va_list args_in
 					ch = *format++;
 				}
 				break;
+			case 'j':
+				cnk->cflags = DP_C_LLONG;
+				ch = *format++;
+				break;
 			case 'L':
 				cnk->cflags = DP_C_LDOUBLE;
 				ch = *format++;
-- 
1.9.1



More information about the samba mailing list