[Pkg-samba-maint] "fix" for #221618 - LARGEFILE_SOURCE in libsmbclient.h

Michael Tokarev mjt at tls.msk.ru
Sat Apr 2 18:32:15 BST 2022


02.04.2022 18:39, Michael Tokarev wrote:
[...]
> I wonder what can we do here.  My immediate thought is to
> check if _LARGEFILE64_SOURCE is not defined or defined
> "wrongly", and error out if that's the case.

And this does not quite work. For this to work, I need to check
if sizeof(long)==4 before checking for _FILE_OFFSET_BITS.
Because if sizeof(long)==8, this _F_O_B define isn't needed,
and indeed it is not used on any 64bit platform. It is used
on 32bit platforms only.  So if we'll add

#ifndef _FILE_OFFSET_BITS
# error
#endif

it will immediately start erroroding out for every user on
any 64bit platform out there.

*Sigh*.

But we sure can remove this patch at least, since it does
absolutely nothing anyway (as (re)defining _F_O_B after
including <sys/types.h> is absolutely pointless.

/mjt



More information about the Pkg-samba-maint mailing list