Skip to content

Commit

Permalink
Small LSB hacks
Browse files Browse the repository at this point in the history
Enable building QtDeclarative with the LSB compiler

Change-Id: I3a81247670f47db3d861910150a722bc8ac7691a
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
  • Loading branch information
Harald Fernengel authored and Qt by Nokia committed Mar 15, 2012
1 parent 21e228a commit 49b451d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/qml/qml/qqmltypeloader.cpp
Expand Up @@ -63,6 +63,19 @@
#include <dirent.h>
#endif

#if defined (QT_LINUXBASE)
// LSB doesn't declare NAME_MAX. Use SYMLINK_MAX instead, which seems to
// always be identical to NAME_MAX
#ifndef NAME_MAX
# define NAME_MAX _POSIX_SYMLINK_MAX
#endif

// LSB has a broken version of offsetof that can't be used at compile time
// https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=3462
#undef offsetof
#define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER)
#endif

// #define DATABLOB_DEBUG

#ifdef DATABLOB_DEBUG
Expand Down

0 comments on commit 49b451d

Please sign in to comment.