mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
r13231: apparently strncat() is converted to strcat() on RH7.3 and similar systems. Fix the build on those boxes
(This used to be commit 0b8ed8136b5c5b9b7bb5615dc8dc27eec7c49506)
This commit is contained in:
parent
7de55b30b7
commit
8724ea7ef5
@ -29,6 +29,7 @@ const char *samba_version_string(void)
|
||||
static fstring samba_version;
|
||||
fstring tmp_version;
|
||||
static BOOL init_samba_version;
|
||||
size_t remaining;
|
||||
|
||||
if (init_samba_version)
|
||||
return samba_version;
|
||||
@ -38,8 +39,9 @@ const char *samba_version_string(void)
|
||||
SAMBA_VERSION_VENDOR_SUFFIX);
|
||||
|
||||
#ifdef SAMBA_VENDOR_PATCH
|
||||
fstr_sprintf( tmp_version, "-%d", SAMBA_VENDOR_PATCH );
|
||||
fstrcat( samba_version, tmp_version );
|
||||
remaining = sizeof(samba_version)-strlen(samba_version);
|
||||
snprintf( tmp_version, sizeof(tmp_version), "-%d", SAMBA_VENDOR_PATCH );
|
||||
strlcat( samba_version, tmp_version, remaining-1 );
|
||||
#endif
|
||||
|
||||
init_samba_version = True;
|
||||
|
Loading…
x
Reference in New Issue
Block a user