Bug #7317

When building libdvdcss-1.4.0 _FILE_OFFSET_BITS reported to be redefined

Added by r a over 4 years ago. Updated over 4 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


When building libdvdcss-1.4.0 with command below this executes correctly.

$CC=gcc ./configure --prefix=/usr

However, when I issue the gmake command to build the library I get the following error

/tmp/libdvdcss-1.4.0$ gmake
gmake all-am
gmake[1]: Entering directory '/tmp/libdvdcss-1.4.0'
CC src/libdvdcss.lo
CC src/device.lo
CC src/css.lo
CC src/ioctl.lo
CC src/error.lo
In file included from src/device.h:28:0,
from src/libdvdcss.h:31,
from src/error.c:26:
./config.h:152:0: warning: "_FILE_OFFSET_BITS" redefined [enabled by default]
#define _FILE_OFFSET_BITS 64
In file included from /usr/include/stdio.h:37:0,
from src/error.c:24:
/usr/include/sys/feature_tests.h:231:0: note: this is the location of the previous definition
#define _FILE_OFFSET_BITS 32
doxygen doc/doxygen.cfg
touch stamp-doxygen
gmake[1]: Leaving directory '/tmp/libdvdcss-1.4.0'

Examining the /usr/include/sys/feature_tests.h:231 I find that the line is #define _FILE_OFFSET_BITS 32 by changing this to 64 bits temporarily the build of libdvdcss completes.
Given that largefile support is enabled by default is this an error in the include files?


Updated by Aurélien Larcher over 4 years ago

Documentation says that in 32bits if the macro is not defined before inclusion of the header file then it is default initialized as 32 (and that's actally the behaviour enforced by the header).
Passing the macro definition in CPPFLAGS should remove the warning.
In any case this is not a bug since the code actually redefines the macros to support large files and this does not require changing system headers.

To remove the warning add $(CPP_LARGEFILES) to CPPFLAGS, defined in

It expands `getconf LFS_CFLAGS` as "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" which is exactly what we want.


Updated by Aurélien Larcher over 4 years ago

  • Status changed from New to Closed
  • Difficulty deleted (Medium)

Invalid, described behaviour is as documented and should make use of required compilation flags.


Updated by Aurélien Larcher over 4 years ago

May I suggest that you could update the component in oi-userland in the process?

Thank you in advance if you have the time to help :)

Also available in: Atom PDF