Re: Definition of off64_t

On Tue, 30 Sep 2008 20:40:54 -0500, Steven G. Kargl wrote:

In article
TC <C.discussions@xxxxxxxxx> writes:

I am trying to port an application written on Linux to FreeBSD. During
compile, I am getting an error saying that off64_t is not defined.
Which header file do I need to include to get the definition for
off64_t ?

off64_t isn't defined on FreeBSD in a header supplied by the system.
You'll need to look at the definition on linux and find the appropriate
value in stdint.h

It's almost certainly off_t (aka long long or perhaps unsigned long long
in c99). To the OP: FreeBSD doesn't have off64_t because off_t et al are
64 bits, even on 32-bit systems, and have been ever since the net4.4
release from UCB (at least). Consequently, there isn't a separate set of
interfaces for 32-bit and 64-bit files or file systems, they're all 64-

On the flip-side, if the OP doesn't want to fix the code, I suppose that
he could compile it as linux, under linux emulation...



Relevant Pages

  • Re: Confessions of a Linux Wannabe
    ... wouldn't be able to tell you if it is using Linux or FreeBSD. ... As for software installation: FreeBSD has a package management system ... download/build dependencies if applicable, configure and compile the ...
  • Re: Problem compiling cgi on 4.10 Release
    ... > won't run or compile on FreeBSD 4.10 Release? ... In the worst case I need one snippet of code for FreeBSD and a different ... snippet for Linux. ...
  • Re: FreeBSD 4.x Opteron Question
    ... the FreeBSD developers told everyone that 5.3 was da ... initially over linux not because there's a bunch of good guys on the ... My tests measure kernel performance; ... > a networking device is a key performance indicator. ...
  • Re: FreeBSD has serious problems with focus, longevity, and lifecycle
    ... my freeBSD days seem to be coming to an end. ... freeBSD will be support this GPU in R9... ... i really like freeBSD's robustness, especially compared to linux, among ... tight, we run CentOS, which is essentially a repackaged version of RHEL. ...
  • Re: HLA, Flex, and Bison
    ... > but you can compile productions separately and link those together (i.e., ... FreeBSD does that for the C library, so it should be possible here. ... In fact, FreeBSD does the same for its Linux compatibility mode, so it ... Looking at the libraries, it looks like, except for the syscalls, the ...