[Dnsmasq-discuss] dnsmasq isn't happy when log file reaches 2GB?
Matthias Andree
matthias.andree at gmx.de
Fri Apr 4 09:14:17 BST 2008
Simon Kelley <simon at thekelleys.org.uk> writes:
> Paul Chambers wrote:
>> Rune Kock wrote:
>>
>>>On Fri, Mar 28, 2008 at 1:34 AM, Paul Chambers <bod at bod.org> wrote:
>>>
>>>
>>>>Does dnsmasq have a problem when the file it's logging to reaches two
>>>> gigabytes?
>>>>
>>>
>>>Are you using FAT or some equally horrible file system?
>>>
>>
>> noooo.... I'm not that big an idiot ;) it's an ext3 filesystem, on a
>> 3ware RAID card.
>
> Looks like, on Linux, we need to open the file with O_LARGEFILE. From
> "man 2 open":
>
> O_LARGEFILE
> (LFS) Allow files whose sizes cannot be represented in an
> off_t (but can be represented in an off64_t) to be opened.
>
>
> I'll add the fix.
That's probably the wrong way to do it, better
#define _LARGEFILE_SOURCE 1
#define _FILE_OFFSET_BITS 64
or the equivalent on the compiler and linker command lines - the
canonical way to obtain these flags would be to use getconf(1) to query
LFS_CFLAGS, LFS_LIBS, LFS_LDFLAGS.
This works at least on Solaris and Linux.
--
Matthias Andree
More information about the Dnsmasq-discuss
mailing list