From: Harald Fernengel Date: Tue, 13 Mar 2012 20:34:05 +0000 (+0100) Subject: Small LSB hacks X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=49b451dae44d801524288d16d8f45a3ef583275e;p=konrad%2Fqtdeclarative.git Small LSB hacks Enable building QtDeclarative with the LSB compiler Change-Id: I3a81247670f47db3d861910150a722bc8ac7691a Reviewed-by: Roberto Raggi --- diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index 36ba530..781915e 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -63,6 +63,19 @@ #include #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